Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Set a default positions to XR Device Simulator

Discussion in 'XR Interaction Toolkit and Input' started by kexar66, Feb 16, 2021.

  1. kexar66

    kexar66

    Joined:
    Feb 27, 2013
    Posts:
    43
    Hi guys,
    is there a way how to set a default positions to camera, left hand, right hand in XR Device Simulator? Right now it is always reset to zero position after start.

    Thanks!
     
  2. chris-massie

    chris-massie

    Unity Technologies

    Joined:
    Jun 23, 2020
    Posts:
    207
    At the moment, there is no way to configure this. We are planning on improving the API to allow the simulator to be more fully customized including giving a set of sensible default poses for the HMD and controllers, but no timeline for when this will be done at the moment.
     
  3. geo_p

    geo_p

    Joined:
    Jul 24, 2012
    Posts:
    4
    Hello there, is there any update on this?

    Just wondering if I can save my default HMD and controller positions so I don't have to spend precious seconds positioning them every time I hit play. Thanks!
     
  4. geo_p

    geo_p

    Joined:
    Jul 24, 2012
    Posts:
    4
    If anyone is interested, I wrote a helper script you can add to the XR Device Simulator prefab to save the position and rotation state of the HMD + controllers in PlayerPrefs between play sessions.

    Tested with XRInteractionToolkit 2.0.3, may break in future versions as it access private member variables.
     

    Attached Files:

    tom_fv likes this.
  5. dclipca

    dclipca

    Joined:
    Oct 30, 2021
    Posts:
    2
    Thank you. I also found out you have to restart the editor after adding XRDeviceSimulatorPersist otherwise it doesn't work.
     
unityunity