cancel
Showing results for 
Search instead for 
Did you mean: 

In Unity: How to make OVRAvatar play nicely with OVRPlayerController?

rbennett22
Explorer
I recently obtained my Oculus Touch Controllers and am attempting to integrate OVRAvatar with OVRPlayerController (in Unity).  The downloadable OVRAvatar samples work correctly for me, however if I child the OVRCameraRig to an OVRPlayerController, I can no longer see the avatar hands.

One partial solution I found is to child the OVRAvatar GameObject to the OVRPlayerController GameObject.  However the hands then do not render in the correct positions under certain circumstances, such as when OVRPlayerController's "Use Profile Data" property is checked, or if OVRPlayerController's "HMD Rotates Y" property is checked.

So I am wondering if there is a better way to allow the avatar to correctly follow the player as they move?

Please let me know if I should provide any other helpful details about my setup or what I have tried.



2 ACCEPTED SOLUTIONS

Accepted Solutions

FocusVRGames
Adventurer
Have you set your LocalAvatar to a child of tracking space?

I have it working with
OVRPlayerController
     OVRCameraRig
         TrackingSpace
              LocalAvatar

Hope that helps

View solution in original post

rbennett22
Explorer
SOLVED.  Making the LocalAvatar a child to TrackingSpace works for me.

P.S.  It turns out the main issue I'm having is related to loading additional scenes.  I'm looking into solutions to this issue, and will post on a separate thread if I have additional Q's or beneficial findings. 

EDIT:  I have posted about the main issue I am having here:
https://forums.oculus.com/developer/discussion/47780/ovravatar-rendered-parts-freeze-upon-loading-ne...

Thanks!

View solution in original post

5 REPLIES 5

FocusVRGames
Adventurer
Have you set your LocalAvatar to a child of tracking space?

I have it working with
OVRPlayerController
     OVRCameraRig
         TrackingSpace
              LocalAvatar

Hope that helps

rbennett22
Explorer
SOLVED.  Making the LocalAvatar a child to TrackingSpace works for me.

P.S.  It turns out the main issue I'm having is related to loading additional scenes.  I'm looking into solutions to this issue, and will post on a separate thread if I have additional Q's or beneficial findings. 

EDIT:  I have posted about the main issue I am having here:
https://forums.oculus.com/developer/discussion/47780/ovravatar-rendered-parts-freeze-upon-loading-ne...

Thanks!

Anonymous
Not applicable
Just an update from my own derivation of this forum and also in my limited experience, the best way to implement OvrAvatar is to import the OculusPlatform asset as well as the OvrAvatar asset. I also notices that Unity Editor likes it better if you import them respectively as I have stated them. Thank you all so much for any and all contributions! I am so grateful! Happy VR'ing!

Anonymous
Not applicable
Also those OvrAvatar shaders do, in fact, take that long to import... So don't panic! 🙂

tkdHayk
Protege
MickyX said:

Have you set your LocalAvatar to a child of tracking space?

I have it working with
OVRPlayerController
     OVRCameraRig
         TrackingSpace
              LocalAvatar

Hope that helps


Thanks for this. It works! The only issue is, the character controller does not follow the player's roomscale movement. The player can walk away from his body. The OVRCameraRig moves with the player, leaving behind its parent, the OVRPlayerController. I need the player controller to follow the OVR camera movement. anyone know how to get this done properly?