Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Call the continues movement's move() void via script

Discussion in 'XR Interaction Toolkit and Input' started by Sab_Rango, Mar 20, 2021.

  1. Sab_Rango

    Sab_Rango

    Joined:
    Aug 30, 2019
    Posts:
    121
    Hey! I am trying to solve motion sickness in VR by physically running the player when they virtually move.
    I managed to control speed variable of continues movement by script, and tested in real VR practice. It works perfect.
    But, in my script, I couldn't call that "movement()" void that will be triggered when joysticks actions are called by moving manually by the hardware.

    Is there any tricky ways to call that move() input action or character controller move void() via script in the XR toolkit.





    (I could have find those void myself by searching the key works via VS 2019;). but Visual studio can not find the word "CharacterController" from whole solution even I can see it from an opened script :rolleyes:.)
     
  2. Sab_Rango

    Sab_Rango

    Joined:
    Aug 30, 2019
    Posts:
    121
    yeah found the way to move() api in the Toolkit package.

    com.unity.xr.interaction.toolkit\Runtime\Locomotion\Continuous\ContinuousMoveprovider.cs

    added

    Code (CSharp):
    1. var transInWorldSp = ComputeDesiredMove(new Vector2(0,1));
    2.  
    3. MoveRig(transInWorldSp);

    Amazing, now I solved motions thickness of the VR continues movement!