Jump to content

camera postion,angle in VR


photo

Recommended Posts

When I move the HMD, it moves well on the screen, but the position and angle value of the player node do not change.

How can I get the actual angle and position when I move the HMD?

Link to comment

Hi, dongju.jeong!

If you use VR Template, you can get the actual transform of the HMD using the VRPlayer::getHead() function.
If you don't use it, you can get a local transform with getDevicePose() in AppVive/AppOculus plugins.

Best regards,
Alexander

Link to comment

AppViveProxy class is a part of the VR Template. Both plugins implementing HMD support (AppOculus and AppVive) have UnigineScript interface. So, in order to use them in our C++ project we need a proxy class (sort of API "translator") for each of them, wrapping UnigineScript methods in C++.

So, if you use the VR Template it is already there.

Thank you!

Link to comment
×
×
  • Create New...