Hi,
I was following along with the DOTS pong example video when I noticed some strange behavior. Even with restitution set to 1 for all objects and no linear damping, I couldn’t get a ball to conserve velocity. Each bounce slowed it down until it ended up resting against a wall.
Some more details to reproduce the issue:
- Two box physics shapes to serve as walls. Friction set to 0 and “Minimum”, restitution set to 1 and “Maximum.”
- The walls each have a static physics body.
- A sphere physics shape is used as the ball with the same friction and restitution settings.
- The sphere has a dynamic physics body with linear damping 0, gravity factor of 0, and some initial linear velocity to make it hit one of the walls.
Experimenting with the mass on the sphere shows that setting it to the minimum of 0.001 causes it to bounce more times before stopping while a high mass causes it to slow down more quickly. I tried angular damping values from 0 to infinity with no noticeable effect.
Apologies if this is a dumb question, but I couldn’t find anything related after searching around for a while. To me it seems like there is still some linear damping being applied even when set to zero. Mass shouldn’t have an effect on perfectly elastic collisions with no damping, right? Hopefully someone can help shed some light on this.