For our first demonstration, we will implement a simple bouncing ball. When a ball drops from mid-air and hits the ground, we want it to bounce up, then fall down again, bounce up again and fall, with diminishing velocity and height over time. We are going to start simply with a new scene that consists of a ground plane and a sphere. Then, we'll add physics to it, a bit at a time, as follows:
- Create a new scene named 09-BallsFromHeaven by clicking File | New Scene and File | Save As
- Add anXR Rig by selecting GameObject | XR | Stationary XR RigorRoom-Scale XR Rig.
- Position it toward the back of the ground plane (setPosition0, 0, -4).
- Set theMain Camera | Camera | Clipping Planes | Nearto0.01
And set up the GameObjects, as follows:
- Create a plane named Ground Plane using GameObject | 3D Object | Plane, and reset its transform (Transform | right-click | Reset) ...