-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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 signals don't work on static and rigid RigidBody2D but do work between rigid and kinematic RigidBody2D #23042
Comments
I think it should not report anything on static or kinematic mode, since those kind of bodies do not detect anything and the physics engine do not expect anything from bodies like that either. Looks more like a bug on the kinematic mode (unless it is a feature). |
The kinematic body can be moved and it's fine if it keep track of collision. @eon-s Do you think that it should not keep track of collisions? Also for static body it's expected |
@AndreaCatania I think it is not normal for a kinematic to keep track of collisions (all the implementations I have seen lack of collision awareness except while using special methods like |
I'm currently using a few RigidBody2D nodes in kinematic mode on a game I'm working, and the collision detection has been proven quite handy for my use case. If there's no downsides of keeping track of collisions for rigidbodys in kinematic mode, please consider keeping them. |
Personally I think that collisions should be possible to be reported ( if monitor is on of course ) for all modes, but please at least keep it for kinematic. How do you all implement reporting collisions with an object that is not supposed to be moved (ex the ground)? At minimum the docs should be updated to reflect the limitations of each type |
Well it's not a limitation, you should track collision of RigidBody and from there perform your calls. I'm not quite sure but the @eon-s reasoning seems correct to me. I want to think about it. |
@Andrea ok but depending on the ratio of Rigid to kinematic this approach may not make sense. What do we gain by removing this from the kinematic capabilities |
To move the kinematic body you use a query to check if the motion can be performed that also return the list of collided. So keep track even of physics engine generated collisions could be useless |
what if the body (when in kinematic mode) is being moved by an animation player? |
In that case, it is not expecting collisions and may need a trigger to solve overlaps and interruptions on the animation. |
is it really that much overhead |
It's not the correct way to move a kinematic |
Seems still valid in 3.2.4 beta3 |
Godot version:
v3.0.6.stable.official.8314054
OS/device including version:
arch linux (godot package v:aur/godot-bin 3.0.6-1)
Issue description:
collision reporting doesn't work when a RigidBBody2d mode is static but does when its set to kinematic.
Steps to reproduce:
create two rigid bodies and set one to static collision reporting wont work when properly set up
Minimal reproduction project:
godotBug.zip
The 2 folders in the zip are snapshots of my git repo. Full history is retained in both dirs. project is located at godotQWOPProj/project.godot in both dirs and the script where i set up the signals is located at godotQWOPProj/groundLineStaticBody2D.gd though its attached to a RigidBody2d.
The text was updated successfully, but these errors were encountered: