Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | stryker31313 |
Lets say you have an area.
var area = $Area3D
You can get a list of the areas and set them to a var, using…
var areas = $Area3D.get_overlapping_areas()
Now, you can specify the type array
var areas : Array = $Area3D.get_overlapping_areas()
However, lets say you had a custom class, and this area was only set to look for these classes
var areas : Array[CustomClass] = $Area3D.get_overlapping_areas()
This does not work, and will through an error in the editor.
I wanted to know if it is possible to do something like this?
var areas : Array[CustomClass] = $Area3D.get_overlapping_areas()