0 votes

My project link

I found it's possible to get objects by position using Physics.OverlapSphere in Unity.
To do so in Godot, I've used function get_overlapping_bodies() of area node that returns a list of intersecting PhysicsBodies.
But I couldn't get latest list.
How to make the list can be modified immediately?
or is there a better way?

in Engine by (16 points)

You can use get_overlapping_bodies() to check for said bodies. But the use of it is discouraged because it incurs a performance penalty (and it only calculates on the physics step). In the documentation, it's recommended to use signals.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.