intersectBodies method
Shoot a ray at an array bodies, get back information about the hit. @param bodies An array of Body objects. @deprecated @param result set the result property of the Ray instead.
Implementation
void intersectBodies(List<Body> bodies, [RaycastResult? result]) {
if (result != null) {
this.result = result;
_updateDirection();
}
for (int i = 0, l = bodies.length; !this.result.shouldStop && i < l; i++) {
intersectBody(bodies[i]);
}
}