The Godot equivalents of Physics.OverlapBox and Physics.CheckSphere from Unity?

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

Hye everyone,

Do you know what are the equivalents for Godot of Physics.OverlapBox and Physics.CheckSphere found in unity? I’m having trouble understanding how to get a list of all the objects that are in the overlap.

Good Day,

Sorry can you explain how those two node you mentioned works so I can tell you the godot equivalent to them

code | 2022-04-10 15:36

I have put the information below.

patatra | 2022-04-12 10:23

:bust_in_silhouette: Reply From: patatra

Thank you,
Physics.OverlapBox : return a array of Colliders that overlap with the given box.

Physics.CheckSphere : Returns true if there are any colliders overlapping the sphere defined by position and radius in world coordinates (a collison mask can be included or excluded).

Good Day,

:bust_in_silhouette: Reply From: Dantas_The_Eater

i know this is and old thread, but you can use area2d i the same way you use those 2 components in unity (hope this help someone that finds this thread)