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. Dismiss Notice

Question Can the XR Device simulator track device velocity?

Discussion in 'VR' started by rylzxc, Jun 17, 2023.

  1. rylzxc

    rylzxc

    Joined:
    Jun 16, 2022
    Posts:
    3
    As per the title. I am using the InputActionReference to get the deviceVelocity through .action.ReadValue<Vector3>() but it always returns (0, 0, 0) when I move my XR Simulated controllers in game mode.
     
  2. chris-massie

    chris-massie

    Unity Technologies

    Joined:
    Jun 23, 2020
    Posts:
    220
    No, we don't support velocity currently. I created an issue in our backlog to add support for this feature.

    The simulated controllers created by the XR Device Simulator currently do not have any
    PoseControl
    controls to expose the velocity, so your input action is probably not resolving to any controls on the simulated devices like it would for an Oculus Touch Controller (OpenXR). You can verify that by opening Window > Analysis > Input Debugger during Play mode and looking at your input action name to see the resolved binding paths, which will probably be empty. The
    ReadValue<Vector3>()
    call will then return the default for the Vector3 type, which is (0, 0, 0).