Function: findBodyIndex()
ts
function findBodyIndex(obj, bodies): number;Walks up the scene graph to find which body index owns a given object. Returns -1 when no match is found.
Parameters
| Parameter | Type |
|---|---|
obj | Object3D |
bodies | RaycastBody[] |
Returns
number