Search Unity

How to move player by grabbing world space?

Discussion in 'VR' started by mellowdommo, May 20, 2020.

  1. mellowdommo

    mellowdommo

    Joined:
    Nov 6, 2014
    Posts:
    3
    hi!

    I'm trying to code a locomotion system similar to Lone Echo/Sprint Vector, but it's my first time using Unity's XR Toolkit on the Rift S (also I'm still learning to code).

    The mechanic: user keeps a button down and then drags the world to move.

    My code works to bind the controller position to the world but the player sort of blinks to a spot right after pressing the button and before you've dragged.

    Two days and I honestly have no idea. Idk if it's an XR Toolkit/ OVR type of conflict (i tried using the OVRPlayer Controller instead of XRRig, but same thing happens). I've also wondered if it's something about rigidbodies but i tried adding and moving a rb and same thing.

    Player XRRig gameobject hierarchy is the same as default.

    Code is here>

    https://pastebin.com/XaC9L5y5

    Any help will lead you closer to nirvana or heaven or whatever.

    ty