You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking for a way to reset the position of an InstancedMesh when it collides with a ground plane. So when it collides, I would want to update the position and velocity of that instance's physics body.
But it seems there is no way to get the current instance index from the onCollide callback. Similar question here: #106
Would it be possible to directly expose the physics bodies in addition to the Object3D in the CollideEvent?
The text was updated successfully, but these errors were encountered:
ffdead
changed the title
Add cannon bodies to collide event
Add cannon bodies to CollideEvent
Apr 29, 2022
If you're referring to exposing the physics body APIs returned from the body hooks, that would be doable! Just dawned on me that you might be referring to that.
If you're referring to exposing the physics body APIs returned from the body hooks, that would be doable! Just dawned on me that you might be referring to that.
Ah yes, I think that would be enough - sorry for being unclear. The purpose would be to be able to reach to a colllision event and add forces manually or modify the position of the bodies that collided.
I'm looking for a way to reset the position of an InstancedMesh when it collides with a ground plane. So when it collides, I would want to update the position and velocity of that instance's physics body.
But it seems there is no way to get the current instance index from the
onCollide
callback. Similar question here: #106Would it be possible to directly expose the physics bodies in addition to the Object3D in the CollideEvent?
The text was updated successfully, but these errors were encountered: