Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by NFB_VM · Oct 19, 2016 at 06:30 PM · vrvideooculus

Disable Positional Tracking of Oculus CV1 in Unity 5.4.1

In Unity 5.3.3 through 5.4.0 we used the OVRPlugin to VR support and parameters like rotational and positional tracking.

Now that the VR Camera it built into Unity, the OVRPlugin is no longer required, but the ability to enable/disable rotational and positional tracking is not available in Unity.

How can I disable positional tracking of the VR Camera in Unity 5.4.1?

I am trying to play a stereoscopic 360 video in Unity, so I have no need for the positional tracking.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by EyePD · Oct 21, 2016 at 06:24 PM

Unity 5.6 introduced a disablePositionalTracking static into UnityEngine.VR.InputTracking.

If you need to do it in older versions, in this thread it's suggested that you can:

Make a script on the parent object of the camera that moves the transform position to counteract the position on the camera transform.

I tried it out and it seems to work fine:

 public class DisablePositionalTracking : MonoBehaviour {
 
     public GameObject cameraGameObject;
 
     
 
         // Disable positional tracking by applying an opposite offset from the camera that's being
         // moved by the HMD. This script should be applied on an empty parent object of the camera.
         void Update ()
         {
             if (cameraGameObject != null)
             {
                 Vector3 offset = new Vector3(
                     -cameraGameObject.transform.localPosition.x,
                     -cameraGameObject.transform.localPosition.y, 
                     -cameraGameObject.transform.localPosition.z);
                 transform.localPosition = offset;
             }
         }
     }

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image NFB_VM · Oct 25, 2016 at 05:50 PM 0
Share

Thanks for the suggestion. I tried implementing this with Unity 5.4.2, which apparently updates the Oculus plugin to 1.8. I'm getting a noticeable drop in performance.

With the default positioning enabled on the native Unity VR camera, I'm getting 90FPS.

With the DisablePositionalTracking script, I'm getting frequent (every 3-4 frames) spikes down to 35FPS.

With the OVRPlugin and Position Tracking disabled, I'm getting 90FPS.

Hope that Unity builds a native editor solution soon.

avatar image
0

Answer by NFB_VM · Oct 21, 2016 at 07:13 PM

Thanks for the reply. I ended up using the OVRPlugin, but this is obviously not ideal for cross platform. I may try you suggested solution, but it seems like there's a lot of unnecessary processing going on to counteract something that should be disable-able.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image EyePD · Oct 21, 2016 at 07:54 PM 0
Share

I think the performance impact here should be negligible; it's really just one extra transform and copying and negating the camera's transform should be pretty low impact. I agree completely though; this should just be a checkbox. Please consider voting for bug 788105.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Video freezing after a few seconds on Oculus Quest builds. 0 Answers

Overlaying 3D video on top of rendered world in VR 1 Answer

Video system / rendering is stuck on Android OculusGO 0 Answers

360 video resolution (Gear VR) 1 Answer

Android build - videoplayer - cannot read .mp4 file 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges