Vrroom VR
Take a look at how I engineered a realistic VR scooter simulation by scripting collision dynamics and controller-to-movement translation in Unity. 🛵
About Vrroom VR
I crafted a virtual reality Vespa scooter simulation using Unity, incorporating Oculus Integration, for an immersive riding experience. In this game, players can accelerate the scooter by pressing the trigger buttons on their VR controllers and steer by turning their head left and right, seamlessly changing the scooter’s direction.
Phase 1: Ideation
In the development of the game, I aimed to utilize the controller affordances to create a unique user experience, envisioning the controllers as scooter handles with accelerators and brakes. The idea was to have the players tilt the controllers parallel to the floor, mimicking the real-life action of steering a scooter.



However, implementing the tilt functionality proved challenging. The biggest challenge was to accurately calibrate the tilt of the controllers about the Y-axis and translate it to the scooter’s rotation/steering. I opted for a quick fix by using head rotation for steering instead. Doing so allowed me to make progress in the game development, providing a workable solution for the time being.
Phase 2: Prototyping the Scooter Model
The project began with the creation of a new 3D URP project in Unity, with the Oculus integration package installed to ensure compatibility with the Meta Quest 2 headset.
I started prototyping by white boxing a basic scooter model on a simple plane, refining it with separate detailed components like bike handles to enhance realism.
To simulate the actual riding experience, I integrated an OVR player controller within the scene, positioning it to mimic how a person would sit on the scooter.
I attached the left and right handles of the scooter model to the OVR player controller's left and right hand anchors, respectively. This was done to simulate realistic control of the scooter.


Roadblock
During the testing phase with the Quest 2 headset, I identified that the handles, intended to be horizontal, were misaligned by 90 degrees in-game.
This issue required additional adjustments of the handle's orientation and spacing, to more accurately reflect the real-world scooter mechanics. A sphere was placed at the center of the handles as a visual guide, and an average transform script was employed to standardize the handle distance.
Phase 3: Integrating Movement Mechanics
Accelerating the Scooter:
The movement system of the scooter is determined by an accelerator script, which I developed to work in tandem with the Meta Quest controllers. The script facilitated forward movement of the scooter when the Secondary Index Trigger was pressed on either of the controllers.

More Movement Mechanics
Steering the Scooter:
While steering proved to be more complex, I initially attempted to implement it using lerping with guidance from my professor, Ciera Jones. However, due to time constraints, I shifted to a simpler yet effective method as suggested by Professor Jones. In this new implementation, the scooter's steering is controlled by the player's head movements.
My script enabled the scooter's direction to be determined by the player's head orientation, excluding vertical movements for a consistent level and a more natural riding experience.
Phase 4: Game Environment
I then took a little break from implementing basic mechanics to build an immersive gameplay, I sourced detailed models like a Vespa scooter, houses, and roads from the Unity Asset Store, and additional objects such as vehicles, lamp posts, traffic cones, and animals from Sketchfab. I imported my player character from Mixamo. These elements were integrated into the game to build an interactive world. Replacing the whitebox model with a detailed scooter from the Asset Store significantly improved the game's visual appeal.

Phase 5: Collisions for Dynamic Iterations
Next, I implemented various collision scripts to make the game environment interactive, allowing for dynamic responses when the scooter interacted with different elements. To keep things original, I created particle systems to create visual effects upon collisions. I also used audio source components on animal objects that trigger during collisions. Additionally, I added collision scripts on lamp posts in the scene to change colors as the scooter passed. by, enhancing the dynamic and interactive nature of the game world. You can find the script I used to achieve this below.


Throughout the project, I implemented diverse collision mechanics to simulate realistic interactions within the game world, including:Collision between non-trigger colliders with rigid bodies.Interactions between non-trigger colliders with and without rigid bodies.Dynamics of colliders with rigid bodies against non-trigger colliders without rigid bodies. Trigger collider interactions with non-trigger colliders having rigid bodies.
In the following example, I implemented a collision involving a Non-Trigger Collider with Rigidbody vs. Non-Trigger Collider without Rigidbody to change the color of a lamppost when collided with.

You can find the script I wrote for this event below:

During the implementation of these scripts, I gained significant insights into scriptwriting and debugging within Unity.
Additionally, I learned to effectively utilize tools like ChatGPT, to obtain precise information and

