0 votes

Hello,

I am creating a small project in which a KinematicBody platform (controlled by the player) has two rigid bodies stacked on top.

However, when I move the platform on the horizontal axis, the rigid bodies start overlapping and even passing through the platform.

I append two images to depict this:
The project just started running and everything is as expected

In this second image I've moved the platform slightly to the right, and the two bodies have started to overlap and go through

I've tried disabling infinite_inertia in the platform, but the same happens.
Any ideas on how to improve this interaction?

Thanks!

Godot version v 3.3.3
in Engine by (12 points)
edited by

1 Answer

0 votes

Images don't load.

It is possible, that physycs engine will not properly set collisions between rigid and kinematic bodies. What propably happens is kinematic platform moving by overriding its global_position and Rigid bodies falling with gravity force into kinematics collision shape. I would suggest to make platform a RigidBody also, but with Kinematic mode ( There are 3 modes of rigid bodies - rigid, static and kinematic ). If You can't do this You may eventually tweak mass/gravity of rigidbodies or make kinematic collision shape thicker, with big margins.

by (2,410 points)

Thanks a lot for the answer. I think that the problem is related with the stacking-bodies bug in godot, and I was able to solve it by increasing the physics fps to 180.

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 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 webmaster@godotengine.org with your username.