-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
RigidBody2D isn't detecting every collision #40526
Comments
Does it work better if you increase Physics Fps in the Project Settings or increase the sizes of the bullet collision shapes? If so, this means the lack of collision detection could be due to tunneling (#9071). |
I cranked the Physics FPS up to 144 and made the collision shape bigger, but it didn't seem to affect it. |
@Calinou Something that could be helpful. I think it might be that moving the blocks makes the detect collision. I have a grapple hook that moves objects that it attaches to, and if I hit one of the blocks with the hook and shoot it right after, it will detect the collision from any distance. At first I thought it might have to do with the blocks sleeping, but neither of the sleeping settings were turned on. Video of it in action: https://watch.haddock.cc/videos/watch/4f26e468-dc84-4846-9079-2612ae9f36b4 |
@poperigby is your bullet a kinematic object? |
Yeah |
Try making your |
That doesn't seem to help
Why would that help? |
Kinematics bodies are not supposed to be used with objects that are extensively dynamic in nature. It's good for moving characters around, whereas rigid bodies deals with motion, collision and collision responses robustly. With rigid bodies, all you have to do is set your bullet's velocity in direction of the destruction blocks and on collision just subdivide, and all the motion related stuff will be handled internally by godot. |
That fixed the issue, but I still think it's a problem that rigid bodies aren't detecting kinematic bodies. |
In the move_and_slide method (which you should be using), set infinite inertia to false, that'll make them collide |
Godot version: v3.2.2
OS/device including version: Arch Linux
Issue description:
I have a RigidBody2D setup, and it supposed to break into smaller pieces when it detects a collision from any other body in the group "bullets". The thing is, it's only detecting some of those collisions. Here's a video of it in action: https://watch.haddock.cc/videos/watch/3448edb0-3ad0-4fe3-ad3d-2293c6fa0ca7
It's pretty unreliable in its detection when you shoot at it from far away, but it becomes pretty reliable when you're at point blank range. Other than that, it seems entirely arbitrary whether or not it will detect collision.
I've tested it on other RigidBody2Ds without the above functionality, and they also aren't reliable in their collision detection.
Steps to reproduce:
Minimal reproduction project:
Here's a link to the download of the source code: https://git.haddock.cc/ScrapjackStudios/slayer/src/commit/38c197fa8f4de5027e174c5ba27a3d28a87dff98
I couldn't compress it anymore than 12MB
The text was updated successfully, but these errors were encountered: