- Home /
VR: Player movement along a spline with controller movement as input (no buttons at all)
Hey there,
I am trying to build a game for VR (Quest2) where the player moves upwards along a predefined spline in the game by moving the controllers down in the real world (moving the controllers up would not have an effect). You can think of it as climbing up a rope VR.
Most of the scripts and tutorials I found about movement in VR use the controller buttons as input. In my case I do not want to use buttons at all, just the position/controller movement. Specifically I want to use the controller movement in z-direction.
So I need to:
detect whether the controller(s) move in minus z-direction
extract movement/moved distance of controller(s) in z-direction
move the player/main camera along the spline (same or proportional distance that was extracted from controller movement) - ideally the z-axis of the main camera would also get automatically aligned with the spline while going up (instead of being vertical all the time).
I tried to find suitable scripts online but since I am a complete beginner I don't even know where to start searching. If you could point me in the right direction this would be great!
Thank you!
Your answer
![](https://koobas.hobune.stream/wayback/20220613055607im_/https://answers.unity.com/themes/thub/images/avi.jpg)