Forum Discussion
Podden
11 years agoProtege
Moving players virtual body for positional tracking
So I'm currently trying to rig our pilot model for Darkfield do let the neck follow the body. He's sitting inside a cockpit so I only have to move the upper parts all the way down to the elbows.
Unity does support inverse kinematic by script, but only for the arms. There has to be some kind of "inverse inverse kinematic" with root nodes as elbows and the solver on the head or neck joint.
Any advice or experience on that field?
Unity does support inverse kinematic by script, but only for the arms. There has to be some kind of "inverse inverse kinematic" with root nodes as elbows and the solver on the head or neck joint.
Any advice or experience on that field?
2 Replies
Replies have been turned off for this discussion
- MichaelSchenckHonored GuestThere have been a few threads on this that I have found:
http://www.reddit.com/r/oculus/comments/2bdnlx/dk2_positional_tracking_in_your_game_and_the/
https://developer.oculusvr.com/forums/viewtopic.php?f=37&t=10650
For Unity, Final IK http://u3d.as/content/root-motion/final-ik/6ec seems to be a pretty good investment for this and works well. I am planning on using it to handle the positional tracking on the avatar in Lost Loot. Although it will be interesting handling extreme cases and dealing with clipping through walls and so on. I think the general feeling is to shift the avatar via ik until it reaches its constraints and then it stops moving and the view continues to shift disconnected from the avatar. I feel like there are some situations where the avatar could slide some with the extreme cases. You never want to restrict the positional tracking so clipping could be done by simply fading the world to black as you approach the point where the player clips through a wall or again slide the avatar as if you were pushing on the wall with your head. It will be fun to experiment with this to see what feels OK. - PoddenProtegeOkay I've managed it just by skinning, rotating the spine and moving the head Joints height position. If anyones interested:
void Start () {
headInitPos = head.localPosition;
ovrCameraRight = Camera.main.transform;
}
void Update()
{
//ship.up is the Up Vector. it can be world up or some local up (like i a cockpit which is rotating itself
transform.LookAt((ovrCameraRight.position - transform.position) + transform.position, ship.up);
transform.localRotation *= Quaternion.Euler(leanAdjust, 0, 0);
head.localPosition = ovrCameraRight.localPosition * ovrCameraRight.lossyScale.x + headInitPos;
}
Look Okay for me for now:
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 9 months ago
- 2 years ago