0 votes

Hello,

I have made this test where a ball (StaticBody2D) is control via the mouse, and can interact with falling objects (RigidBody2D). Link to Image here

All is working well but I have this huge issue where if the mouse is too fast it goes through the object. I wonder if it is because the collision detection occurs every frame, but do someone has a solution for this ? I tried everything.

Thanks so much !

Godot version V3.3.2
in Engine by (15 points)

1 Answer

0 votes

set continous_cd property of rigid bodies to true

by (7,925 points)

Already tried to set it to "Cast Ray" or "Cast Shape" but it changed nothing.

It won't work wth ccd turned on for both objects and controlled ball ? This must be a problem with movement code. How do You control the ball ? Try using RigidBody methods ( calculate forces ) instead of overriding global_position every frame

Oh now I understand, I only changed the position to be equal to the mouse position. Now I get it thank you so much :)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.