-
I'm currently making a simple pong game using Heron, and while it mostly works there is one issue. When the ball moves at a sufficiently high speed, it goes through the paddles. Is there any way to enable physics interpolation or otherwise prevent this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, This is a common issue with discrete physics simulation, and it has no real easy answer. But here are the two things you may try:
All of that being said, there is maybe something we we can do on heron to aleviate this kind of problem. Maybe we have to re-introduce |
Beta Was this translation helpful? Give feedback.
Hi,
This is a common issue with discrete physics simulation, and it has no real easy answer.
But here are the two things you may try:
Increase the number of steps per second (by configuring the PhysicsSteps resource). But also make sure to also have a high frame rate (which shouldn't be a problem for a pong)
Play with rapier CCD (Continuous Collision Detection) feature: https://rapier.rs/docs/user_guides/javascript/rigid_bodies/#continuous-collision-detection (The rapier
IntegrationParameters
is a resource)All of that being said, there is maybe something we we can do on heron to aleviate this kind of problem. Maybe we have to re-introduce
PhysicsStep
mode that would go at a fixed r…