Developed a Virtual Reality racing app, incorporating 3D physics and immersive gameplay to create an engaging and interactive driving experience.
Concept:
The project's vision is to make learning about the solar system an engaging and accessible experience through virtual reality. By allowing users to "travel" around planets and moons, the application has the potential to enhance educational experiences in astronomy and space science.
Technical:
Planetary Orbit and Rotation
Implemented realistic orbital mechanics for planets and moons to simulate their movement around the sun and their own axes.
1// Orbit around the sun
2transform.RotateAround(sunPosition, Vector3.up, orbitSpeed * Time.deltaTime);
3// Rotate around own axis
4transform.Rotate(Vector3.up * selfRotateSpeed * Time.deltaTime);
5
RotateAround
: Causes the planet to orbit around the sun's position.Rotate
: Makes the planet spin on its own axis.Time.deltaTime
: Ensures smooth and consistent rotation over time.User-Controlled Visibility of Celestial Bodies
Enabled users to show or hide planets and moons using VR controller inputs.
1// Check for input from VR controllers
2bool showPlanets = OVRInput.Get(OVRInput.RawButton.LIndexTrigger) ||
3 OVRInput.Get(OVRInput.RawButton.RIndexTrigger);
4
5// Toggle visibility of celestial bodies
6foreach (GameObject body in celestialBodies)
7{
8 body.SetActive(showPlanets);
9}
10
Impact