Skip to main content
Up and Coming
Sep 24, 2013 10:28 AM UTC

Jump to specific location with position/orientation

Hi everyone,

in my application I want to make "jump" the user to a specific point in space.

I tried to "simply" copy over the position and orientation of the target point to the OVRPlayerController transform:

player.transform.position = jumpLocations[0].position;
layer.transform.rotation = jumpLocations[0].rotation;


(NB: The "copy the orientation" is just a test and will be replaced by adjusting the forward direction of the transform without affecting the camera up/left/right). While the position is set as expected, the orientation is not copied.

Has anyone a hint what to look at?
    This topic has been closed for replies.

    1 reply

    Inspiring
    Sep 24, 2013 10:32 PM UTC
    You can try looking into the "Follow Orientation" property on the OVRCameraController, but I'm not sure that does exactly what you need. You can also look at "OVRCameraControler::SetOrientationOffset()", though this may be difficult to work with manually. The other option is "OVRDevice::ResetOrientation()" which will recenter the view.

    Hope that helps.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV