-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collision detection betwen KinematicBody2D and StaticBody2D and KinematicBody2D unreliable #2097
Comments
I think this isn't a bug and this behavior is related to Continuous Collision Detection (CCD) concept that implemented for RigidBody2D in godot but not for KinematicBody2D and that cause objects with high speed pass through each others. You need clamp speed to prevent this. |
I see, thanks for the explanation. However, the velocity of the ball is already clamped and I've artificially inflated it for the above demo because it reproduces the tunnelling effect more often. In my Arkanoid clone the maximum velocity is only a third of that and the tunnelling effect still happens but less frequently. I can't lower it further because then it's no longer fun to play. What are the options then? Should I rather use a RigidBody2D for the ball and turn off friction and gravity? |
Hm, the forum link you gave me actually suggests that a KinematicBody2D has more precise collision detection than a RigidBody2D, not the other way around? |
Sorry about the delay. Is this still reproducible in the current master branch? The example project is no longer available for download. |
I no longer have the the code to reproduce so this should be closed. |
Collision detection between a KinematicBody2D and StaticBody2D or KinematicBody2D is unreliable, that is a KinematicBody2D sometimes enters and gets stuck in another KinematicBody2D or it passes through a StaticBody2D. This happens with Godot 1.1. I've created a minimal example at http://code.guido-berhoerster.org/tmp/BugReproducer.tar.gz to reproduce the problem which bounces a KinematicBody2D ball around a playing field delimited by StaticBody2D walls with a randomly moving KinematicBody2D paddle, it just needs to run a couple of minutes and will pause automatically once the ball either moves inside the paddle or passes through a wall.
The text was updated successfully, but these errors were encountered: