Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
brosenoff's avatar
brosenoff
Honored Guest
3 years ago
Solved

How to seat avatars

Hi,

I am building an Oculus app where similar to workrooms I want to have avatars seated on objects. I have tried this but the avatar always seems to be standing on the object. I have tried to calculate an offset to compensate but it is inconsistent. Is there a way to either calculate an offset to to get the y axis of the bottom of the visible avatar body so that the avatar looks like it is rested. 
I am using the latest SDKs and Unity. 
Thanks!

  • Actually I figured this out. What you need to do is add hips as a critical joint and then when getting the avatar entity you make a call to get the position of the hips then you calculate the offset by taking the y axis of the  hips and subtracting the y axis of the game object. Then you can easily apply that affect when placing the avatar. 

2 Replies

  • Actually I figured this out. What you need to do is add hips as a critical joint and then when getting the avatar entity you make a call to get the position of the hips then you calculate the offset by taking the y axis of the  hips and subtracting the y axis of the game object. Then you can easily apply that affect when placing the avatar. 

  • Sorry to reply to an old post, but would you be able to share your code on how you did this? I'm trying to do something similar with the arms, and it keeps resetting itself back to the original position.