Skip to content

amirmohideen/VRLabFeb28_FlightSimulation

Repository files navigation

Aim: To create a simple VR Spaceship Flying Simulation

Lab Document link: Google Doc for CPP VR Lab - Feb 28, 2025 - VR Flight Simulation

  1. Pull Unity Project from above Github Repo Link
  2. Load project via Unity Hub
  3. Go to Assets\XRI_Examples\Scenes\XRI_Examples_Main and load the scene
  4. Explore the scene
  5. Create a duplicate of the XRI_Examples_Main scene
  6. Delete all unnecessary gameobjects except the XR Rig, environment, joystick and wheel
  7. Download and Import spaceship asset from: Hi-Rez Spaceships Creator Free Sample | 3D Space | Unity Asset Store
  8. Import desired spaceship model onto the duplicated scene
  9. Move the xr rig inside the spaceship cockpit
  10. Make 6 colliders around the cockpit so that xr rig doesnt fall out of spaceship during gameplay
  11. Move the joystick and wheel inside cockpit
  12. Duplicate joystick and move to right
  13. Create a new script and name it ‘FlightSimulatorControls’ and copy paste the code from here: VRLabFeb28_FlightSimulation/Assets/Scripts/FlightSimulationControls.cs
  14. Go to the 1st joystick and set the on value change fields as follows: (pic in google doc above)
  15. Go to 2nd joystick, change joystick motion to ‘front back’ and set the on value change fields as follows: (pic in google doc above)
  16. Go to wheel and set the on value change field to: (pic in google doc above)
  17. Thats all! Now click play and start flying away!
  18. Optionally you can download and import an island from: Free Island Collection | 3D Landscapes | Unity Asset Store
  19. Open up one of the island sample scenes, copy and paste the spaceship and environment gameobject to this island sample scene
  20. Adjust your gameobjects accordingly and enjoy crashing into an island!

About

Made for CPP VR Lab Spring 2025

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published