Oculus Unity - Reset Pose , without resetting the rotation
I am working on a VR game using Oculus Rift utlities plugin 1.6.0 (https://developer.oculus.com/downloads/game-engines/1.6.0/Oculus_Utilities_for_Unity_5/) and Unity 5.4.0f3.
The biggest problem I am currently facing is with the player reset position.
So basically if the player moves back beyond a particular direction or moves into a wall, then the head gets snapped back to the root origin of the OvrPlayerController(root) Object.
Please refer to this video link for better understanding of the functionality.
(https://www.dropbox.com/s/t208phk2bg6rhe5/adrift.mp4?dl=0)
I am trying to achieve this using `OVRManager.display.RecenterPose();`
which looks like this
public void RecenterPose()
{
VR.InputTracking.Recenter();
if (RecenteredPose != null)
{
RecenteredPose();
}
}
This works fine the head gets snapped back to the origin (root position). But this also resets the rotation which looks a weird. Is there an alternate path to just reset the position leaving the rotation as it is ??
