get_overlapping_bodies() not detecting an instanced child

Godot Version

4.4.1.stable

Hello!

I am trying to make a microwave that cooks a popcorn bag and i have set up the code and everything works if i place the popcorn bag in the microwave manually in the editor.
But when I place the bag into the microwave using the code snippet I attached, the get_overlapping_bodies() function will not see the bag.


attached are the two relevant scripts, the first one being the one that spawns the bag into the microwave and the second one being the one that checks if the bag has the method “cook” and then runs that method
like I said, it all works fine if I attach the bag manually in the editor to the plate_attachment_point but it wont work with the instantiated scene.

Thank you!

I resolved the issue by making the Popcorn bag into an AnimatableBody3D instead of a StaticBody3D.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.