-
-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
KinematicBody not pushing RigidBody at certain angles #16329
Comments
it would help if you shared the sample scene. |
Here is my project - |
Well, Kinematic bodies using |
@eon-s |
No, the sleeping bodies can be pushed by kinematics moved by set position/translation. Godot physics, on the other hand, has the correct behavior, so is a Bullet problem. |
Here is the same example in Godot Physics with a KB added as child, 2nd KB shape can be disabled to see how bullet should do it too (GP rigids seem to have more inertia so but the push effect is there). |
Thanks a ton @eon-s - That makes sense. I played with your example and it seemed the second kinematic body only pushed the ball if the scale was set to 1.07 or higher from the front. The other angles seemed to be fine. Any ideas on that? That was in the Godot Physics engine. |
There could be some precision issues in the separation process (which may be affecting bullet too, making it push the rigid). |
The problem is that the kinematic bodies doesn't push the rigid bodies so it's not possible by the kinematic body to wake up the rigid. I've already a solution, I'll make a PR soon. @akien-mga also thanks you to let me know this issue. |
Fixed #16757 |
The fix means it now won't stop on collide with rigids? (that is not the way Godot Physics 3D and 2D works) |
True, but think about that. A kinematic body has always infinite inertia; it means that it can't never be stopped by a rigid body also is the opposite for the rigidbody that should always be pushed away by kinematic body. In this moment the kinematic body has inertia 0 against rigidbody and can't never move a rigidbody. Also in this moment both bullet and Godot physics has the same behaviour since neither godot is able to push a rigid body (due to the explanation above) |
I understand that, Godot physics also created the need for complex body setups for interacting with rigid bodies, if this will be the new behavior I think it should be made for 2D too (there will be a revision for 3.1 if I'm not wrong, a good chance to break this). |
The solution to add a kinematic as child of kinematic body basically move the child kinematic body in the position where the the parent is. Then the child will overlap a bit the RigidBody, so the rigidbody react to this overlaps with a movement. As you see this is not a solution but a weird work around that for some reason works. |
@AndreaCatania I'm not sure I understand the workaround. So if I have a KinematicBody and I want it to be able to push rigidbodies, then I need to to add a RigidBody set to MODE_KINEMATIC as the child of the KinematicBody? |
@lane-s the workaround used a KinematicBody as child of the main body, so the transform of the child can overlap rigids to move them, but this is fixed now, not sure if is on 3.0, though. |
I said that this work around is really bad, and I don't back it. however if you use the last version of engine you don't need any work around since I maked a change that allow all kinematics body to push the rigids |
Using the latest release. If I have a kinematicbody run into a rigidbody head on, it doesn't push it. But approaching from an angle does. I have sleep turned off on the rigidbody.
Here is a video showing the issue:
https://youtu.be/4XsyRHYRI94
The text was updated successfully, but these errors were encountered: