cancel
Showing results for 
Search instead for 
Did you mean: 

First Person Character Torso Move with IR-tracked movement

hash280689
Honored Guest
I have a set-up where I have an OVRCameraRig setup in a cockpit. I've also placed a rigged character in the seat, and made the head texture invisible. Obviously the problem here is that if I lean, the body stays where it is and it looks stupid.

So far I have applied rag-doll physics to my character. What I would like to to is keep everything below the waist static, (as he always sits in the same place), and also keep the position of the hand-joints static (grabbing something). The other joints, i.e. arms and torso, I want to remain rag doll, and some how pin it my Oculus camera object, so that if lean forward for example, the torso follows me (within reason). I've tried parenting the character to my OVRCameraRig object but it didn't work.

I was wondering if anyone could help me get started on this please
3 REPLIES 3

MikeF
Trustee
Try looking into inverse kinematics. Typically it's used for arms and legs so that a hand or foot position can determine the angles of any child joints, but this also works great for spine movement. If you set up an IK chain from the head joint to the hips joint and relay the transforms from the OVR controller to the head then you should achieve the effect you're after.

This might be a good start if you're unfamiliar with the formula involved http://u3d.as/content/dogzer/inverse-kinematics/2fP

serrarens
Honored Guest
Dogzer's implementation is not the best one around. It is quite complicated, not very optimized and may be tricky to use. You can find additional information how to use it on my blog: http://serrarens.nl/passervr/inverse-kinematics-for-arms-in-unity-freeindie/.

If you want to make it very easy for yourself, you can use Instant VR Advanced. It takes care of all inverse kinematics and other necessary avatar controls. This video shows how you can add a fully controllable avatar in a car setup:


Of course you can easily replace the avatar mesh by your own.

hash280689
Honored Guest
That's what I've been looking for. I will give that a try soon and pick your brains if I run into any difficulties.

Thanks!