Lab: 3D Game
This is the 3D Collision lab from 3D Collision.
You have a few options for this lab, do as many as you like and you'll get full credit if you do at least three points. Remember that you can find collision tests and displacement functions online in books like Real-Time Collision Detection, which you can get through the library's access to O'Reilly, or you can find these tests on various websites.
Start with your own game, or with the collision3d starter and content.zip.
- Make the marbles collide with the floor and each other.
- Make it so balls on the floor slow down gradually over time.
- Add oriented bounding boxes and capsules and their collision tests, and change the ground into an OBB and marbles into capsules (maybe add a new model). For a second point, compare "staircases" made of several OBBs to "ramps" made of several planes (maybe have just one sphere/capsule and control it directly with the keyboard).
- Switch to swept collision tests to avoid the risk of tunnelling.
- Add angular kinematics so the balls roll as they move based on their velocity.
- Add linear physics, giving the marbles masses based on their radii. For a second point, add angular momentum and physics. Or, for a second point, do collision response by applying impulses instead of moving positions and velocities.