Skip to main content
New Participant
February 2, 2015

Need to disable movement completely

Here's what we're trying to do:

We've mounted a physical camera device on the oculus, and we just want to show the output of the camera on a texture on the scene, and overlay various indicators/whatever on the scene. So we've got that working nicely, but the camera rig keeps changing its position when the user moves their head -- which is definitely not what we want (since it's showing the outside camera output... don't need it).

Basically, we don't want it to be a VR headset right now, just want the oculus to be a nice passthrough display.

Using unity pro and the latest sdk... 0.4.3 I think?

I've seen previous suggestions to disable the UpdateAnchors() function, but that just makes the game view shake a LOT. Using the various options on the rig doesn't seem to make any difference either (disable position tracking, etc). Any thoughts on how to do this?
    This topic has been closed for replies.

    83 replies

    Up and Coming
    September 29, 2015
    My experiences with locking position tracking in Unity 5.2.1.
    I needed to disable position tracking for a short duration while I moved the player over a path, through a narrow tunnel.
    - Using the Oculus Utilities
    - Enabled Unity native VR support
    - Removed the OVRManager script from any OVR camera rigs and added OVRManager to a empty gameobject.
    This way I have only one true instance which is always active. Needed because I enable/disable camera rigs throughout the session.
    - Toggle position tracking by toggling OVRManager.instance.usePositionTracking

    In another project, I had to do a hotfix on-site to disable position tracking.
    As a quick workaround, I scaled up the scene by 100x, this negated the impact of position tracking, while keeping rotation tracking and not requiring any code changes.
    New Participant
    November 18, 2015
    Hi, any way to fully disable movement with GearVR and the new integrated VR in Unity?

    I've followed all the steps, I've found that while doing so and building with "Virtual Reality Supported", the steps on pg 1 of this topic do not seem to have any effect.
    However, building with VR not supported will give me the desired "no movement" effect, but then sacrifices the ability to use it within the GearVR

    I appreciate Unity and the support they've given VR, but personally feel best practices should be up to the developer.

    Any help is greatly appreciated!


    Version: Unity 5.2.1f1
    Inspiring
    November 18, 2015
    Just commend out a block of code responsible for gamepad axes check in player's controller script.
    New Participant
    November 18, 2015
    I've commented out UpdateAnchors() in OVRCameraRig, is that what you mean?
    Inspiring
    November 18, 2015
    "seanicboom" wrote:
    any way to fully disable movement with GearVR and the new integrated VR in Unity?
    Unity is working on an API for this. Messing with OVRPlayerController won't help. For now, you could add the following to the end of OVRCameraRig.UpdateAnchors():
    trackingSpace.FromOVRPose(centerEyeAnchor.ToOVRPose().Inverse());
    That should continue to work in the future.

    A more fragile approach is to call the following internal API, which is not guaranteed to work in the future.
    OVRPlugin.rotation = false;


    "seanicboom" wrote:
    best practices should be up to the developer.
    In most cases they are. However, the relationship between the IPD, head tracking, and field of view is an important property of the display that developers should never change. It sounds like you are trying to use a third-party tracker. That isn't a use case we designed for, but it should be possible using the above.
    Inspiring
    November 18, 2015
    "seanicboom" wrote:
    I've commented out UpdateAnchors() in OVRCameraRig, is that what you mean?


    Nope, I meant something else entirely. Apparently you want to disable rotation tracking, not movement. Cos movement is linear movement, not turning head kind of movement.
    Up and Coming
    November 20, 2015
    "PatHightree" wrote:
    In another project, I had to do a hotfix on-site to disable position tracking.
    As a quick workaround, I scaled up the scene by 100x, this negated the impact of position tracking, while keeping rotation tracking and not requiring any code changes.


    Cute workaround Pat!
    Dave Buchhofer | Dev @ Matterport
    New Participant
    November 23, 2015
    trackingSpace.FromOVRPose(centerEyeAnchor.ToOVRPose().Inverse());

    This one isn't working for me, returns an error at "FromOVRPose". Could be due to older SDK? I'm on OSX so unfortunately can't use the latest.

    OVRPlugin.rotation = false;


    Tried this in the beginning of UpdateAnchors() and, while it built, it didn't seem to have any effect and rotation was still present. Another SDK issue?

    "vrdaveb" wrote:
    The relationship between the IPD, head tracking, and field of view is an important property of the display that developers should never change. It sounds like you are trying to use a third-party tracker. That isn't a use case we designed for, but it should be possible using the above.


    You're totally right, I think I was just a little annoyed. Not using a 3rd party tracker -- I like to think it's a bit more interesting than that. :)
    Inspiring
    November 23, 2015
    "seanicboom" wrote:
    I'm on OSX so unfortunately can't use the latest.
    Why not? Unity 5.2.2p3 and Utilities 0.1.3 should work with Yosemite. They automatically use our 0.5.0.1 SDK there, since that is the last PC SDK that was released for Mac. On El Capitan, we're seeing a loss of positional tracking, but things should otherwise work there, too.
    "seanicboom" wrote:
    OVRPlugin.rotation = false;

    You would have to call this in one of your scripts' Awake functions. You might have to set it to execute first, as well. (http://docs.unity3d.com/Manual/class-Sc ... ution.html). I'll try this out later today. A better fix is on the way inside of Unity, but the pose cancellation approach above should also work.
    New Participant
    November 23, 2015
    @vrdaveb, Thanks for replying on the other thread. I have tried this code

    trackingSpace.FromOVRPose(centerEyeAnchor.ToOVRPose().Inverse());
    , however it results in the screen spinning in random directions.

    I have a OVRCameraRig in my hierarchy, and I disable position tracking by ticking the checkbox in manager script. I also disable Virtual Reality Supported in player settings. However as soon as I press play, virtual reality supported becomes automatically ticked and the camera rotates in all different directions. If I comment out the code above, everything works fine, except that the head-neck model is still present and camera with the head.

    Thanks for all the help, appreciate it.