- Edited
Hi,
I am trying to use a ShapeCast3D to find all objects in a path. According to the documentation, ShapeCast3D can detect multiple collision objects. To test, I set up a scene like this:
When I run this script, it only reports one object. If I move the ShapeCast past the sphere it only reports one cube.
`func _physics_process(delta):
var num_coll = $ShapeCast3D.get_collision_count()
print(num_coll)
for c in range(num_coll):
var obj = $ShapeCast3D.get_collider(c)
var parent = obj.get_parent()
print(parent.name)
print(str($ShapeCast3D.collision_result.size()))
for i in $ShapeCast3D.collision_result:
print(str(i.collider_id))
`
The test scene is at:
https://github.com/tamort/TestShapeCast3D.git