Jump to content

_provector

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by _provector

  1. After some more googling I figured out "Inverse Kinematics" is what I need. I have seen Josh's video with robotic arm demo. Does any one have an example code for something similar? If I understand it right I can't simply set hand position to controller, I would need to write code to "grab/attach" the hand as physics object to controller? I've no ide how to force inverse kinematics then on character bones (Im using merc character for my testing);
  2. I tried adding ball joints between various hands bones in the script but that seems to do completely nothing.
  3. Hi Guys, Is there any easy way in Leadwerks to "automatically" move adjusted bones when I set position to certain bone (like ragdoll model does) or do I have to code all the maths and animations in script? What I'm trying to achieve is some simple body animation in VR following player controllers for hands. Thanks! Kind Regards: _provector
  4. That would be awesome. Thank You!
  5. Hi Guys, If you are stuck I can share my implementation of free movement in VR I wrote in LUA (pm me). reepblue -> Sorry for a noob question, but Im still looking through forums and can't fiind an aswer: How can I use c++ in player scirpts? Engine only allows me to attach lua script to enity, I have the project opened in Visual Studio as well. I have seen some post about people setting up cpp project with loosing lua ability, its still very confusing for me. Any help would be appreciated.
  6. I just tested it on the "beta" branch and I can confirm it's not the issue anymore. I'll leave the topic for record. Please consider the issue closed.
  7. I can see the option to GetRotation, but any attempt to SetRotation fails due to unknown function, any pointers please?
  8. You just made my day Testing it out, thank You!
  9. Hi All! I've been trying to implement free locomotion in VR and learned quite a bit in that process. First a question: Is there a way to set a VR Offset Rotation value in a similar way like VR: SetOffset(vec3) either way through Lua (which I very doubt) or maybe C++ through openVR library? (If so, how?) The lack of above function causes two problems: - One is the inability to implement snap turn in Roomscale mode (Any attempt to "set" the camera seems to be ignored) - The second one is that in Seated mode, whenever I try to manipulate the player camera and adjust the VR Offset accordingly, after turning the camera "in game" the vr offset is completely off (as It can't be turned). Please help guys, as it is a dealbreaker for my project Kind Regards: Provector
  10. I have noticed that on Oculus Rift CV1 In VR. Seated mode, whenever I look directly up or down at a 90 degrees angle the tracking in z plane goes completely "off". Everything is smooth in Roomspace mode. I tried recording a video but for some reason it looks ok on mirrored display, but try looking down or up at angle higher than 90 degrees and the whole virtual world kinda "locks" on one plane.
  11. I have a function call like this: local movementVector = Vec3(-axis.x,0,axis.y) local camRotation = self.camera:GetRotation(true) *Vec3(0,1,0) local rotationAngle = tonumber(math.floor(camRotation.y)); local rotatedVector = self:RotateVector(movementVector,rotationAngle) And a function definition like this: function Script.RotateVector(unexpectedStuff,vector3,degree) --For some unknown to the universe reason a table type is being passed here as a first argument local cosinus = Math:Cos(degree); local sinus = Math:Sin(degree); local newX = vector3.x * cosinus - vector3.z * sinus; local newZ = vector3.x * sinus + vector3.z * cosinus; return Vec3(newX,0,newZ) end It took me a bit of debugging to see why my Math:Cos function was getting Vec3 instead of a plain number. In the scenario above I had to put extra argument in function definition called "unexpectedStuff" as I noticed a table type is being passed to the function upon call. I have no idea why, first time I see something like that in my experience. Attached is a full player script I encounter the issue in. Test.lua
  12. Yes, I went through the API docs, while they are pretty good it looks like a pain trying to re-write lua script in cpp from scratch. Also yes, I tried searching for VR with the above result
  13. Hi All, I'm a total noob with leadwerks (just got it, reading through tutorials), but some of a skilled programmer. I was wondering if anyone has some "template" cpp file to initiate basic vr and player movement like in the provided "VR template" which unfortunately is written in LUA. It would greatly speed up my learning process as I learn most through reading the code Any help, link to othe tutorials or pointers would be greatly appreciated here. Thanks! Matt
×
×
  • Create New...