Improving collisions
You may have noticed when adjusting the velocity that the ball sometimes goes straight through the wall and/or bounces oddly, especially if you choose a high value. There are a few adjustments you can make to the RigidBody properties to improve the collision behavior at high speeds.
First, turn on Continuous Collision Detection (CCD). You'll find it listed as Continuous Cd in the Inspector. Using CCD alters the way the physics engine calculates collisions. Normally, the engine operates by first moving the object and then testing for and resolving collisions. This is fast, and works in most common situations. When using CCD, however, the engine projects the object's movement along its path and attempts to predict where ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access