How does Godot handle StaticBody2Ds?

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

I am working on a project that needs me to enable and disable Collision Shapes on many StaticBody2Ds, and uses a RayCast2D to detect those. However, the RayCast2D doesn’t detect the enabled Collision Shapes at all. Is there anything I can do to fix this, and/or why is it doing this?

:bust_in_silhouette: Reply From: AuthorSan

Do you mean that the raycast2d detects the staticbody2d nodes first, but when you disable and enable them, it doesn’t?

Thats exactly it.

creed2868 | 2020-08-23 13:57