Known issues with multiple collisions at once?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Richardv07

Are there any known issues where Godot has trouble handling multiple collisions that occur at the same time?

In my game the player collects spheres and deposits them in order to kickstart a sun. When the spheres hit the sun, code executes to score the sphere, let the player know it’s no longer dragging that sphere, and nudge any remaining following spheres up closer to the player. Then the orb is deleted using queue_free().

This generally works fine, unless multiple spheres touch the sun at once. In those instances, it deletes all of the spheres trailing the player, but it doesn’t score them or let the player know they’re no longer following (leading to game-breaking issues).

It’s even deleting spheres that have not yet touched the collision area.

Anyone have any insight? I made a forum thread as well that has more detail as well as a link to the project file:

https://godotforums.org/discussion/20992/anyone-willing-and-able-to-help-with-a-weird-collision-issue#latest

I’d appreciate any input as all the solutions I’ve tried don’t seem to help.

I assume you use rigidbodies. Have you tried enabling Continuous Collision Detection from the Rigidbody Menu? Also, it might be the case that as your sun expands, many collision events are not registered due to the fact that the orbs go through the sun in less than a frame’s time, thus causing the game to “miss” the collision. Mess with the Continuous Cd setting in the Rigidbody menu. If you are using areas to do collisions, an you definitely don’t want to use rigidbodies, then maybe try raycasting.

johnygames | 2019-08-04 07:49

Could you provide a demo project that replicate the issue?

BraindeadBZH | 2019-08-04 17:16