cancel
Showing results for 
Search instead for 
Did you mean: 

How to seat avatars

brosenoff
Honored Guest

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!

1 ACCEPTED SOLUTION

Accepted Solutions

brosenoff
Honored Guest

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. 

View solution in original post

2 REPLIES 2

brosenoff
Honored Guest

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. 

violinviolin19
Explorer

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.