Made With Unity VR | A Different Way To Move

Rehtse Studio
4 min readDec 17, 2023

Moving in VR comes in different options that are already well-known to VR gamers: you can use smooth motion and use your thumbstick on your controllers to move around and turn, and for teleportation, you usually point to a spot and move there.

Coming up with new ways to move around in VR can be tricky, and when we have a unique way, the question is, Can We Do It In Unity?😎

A New Way To Move

On September 15, 2023, MoonSeerVR shared a promotional video on Twitter/X for their MoonSeer Motion Vest.

A 360 Free Movement System where standing or sitting, you naturally move, and your movement is passed has omnidirectional movement on VR.

I was in awe🤯 and it made some sense.

So I made a small comment on Twitter, and I was able to do it 😁

MoonSeerVR Motion Vest Movement On Unity

The task is straightforward to understand.

When I, the player wearing a headset, tilt to either the sides, forward or back, I need to move in that direction.

Here was my approach.

Unity Project

I have a VR project running in Unity using the XR Interaction Toolkit package.

Two New Scripts

I created two new scripts that will allow me to get the input based on the tilt and, depending on the input value, where I should move.

TiltMove.cs was created to use the input values and move your XR Rig.

To move my XR Rig, the script inherits from ContinuousMoveProviderBase, a class from the XR Interaction Toolkit that is the Locomotion provider that allows me to smoothly move my XR Rig continuously over time, having access to the method ReadInput(), allowing the reads of the current value of my X and Y inputs.

Where do I get the input?

The TildMoveIdentifier.cs was my approach to reading a tilt and moving in that direction.

Inside the Main Camera object are four child objects; I call them sensors that will send the input values to TiltMove.cs reference.

Each tilt sensor object has a Box Collider that has Is Trigger enabled. The TildMoveIdentifier component will identify which tilt sensor it is and hold a reference to the TiltMove.cs from your XR Rig.

We have a Rigidbody component with Use Gravity disabled.

Now we have one of the COOLEST and AWESOME components I have ever used, the Position Constraint.

This component can stop the movement of an object based on the X, Y, and Z axes following a source object. In this case, my source object in Sources is the Camera Offset child object from my XR Rig, and each “sensor” can move on the Y, BUT they need to be constrained to stop moving on the X and Z axis so when I tilt to either direction I can collide with the “sensor” to move.

PRESS PLAY

In conclusion, I attempted to recreate the MoonSeerVR Motion Vest movement on Unity. It is a fun way to move around VR, and it makes you wonder how to improve it and make it usually in games 🤔

What do you think? Would you happen to know if I did well?

🥽To Be Continued🥽

--

--

Rehtse Studio

Game Developer sharing content around Unity, programing and tips and tricks in game dev.