![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Ogeeice |
Making a 3d game and i have an areabody with objects inside i want to print the number of objects inside using the get_overlapping_bodies()
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Ogeeice |
Making a 3d game and i have an areabody with objects inside i want to print the number of objects inside using the get_overlapping_bodies()
![]() |
Reply From: | jgodfrey |
I’ve never used it, but looking at the docs here:
It’s documented to return an Array
. Looking at the Array
docs here:
An Array
has a size()
method, that returns the number of elements in the array. Using that, I’d expect this to give you what you want…
var bodies = area.get_overlapping_bodies()
print(bodies.size());