Closed AmirHo3einJS closed 1 year ago
@wiledal Yeah sure, like use-cannon library, when we bind physics world to a three JS object, the API that cannon returns has methods for applyLocalImpulse and applyLocalForce which are applied based on the local space of the object not world space.
@AmirHo3einJS not sure what you mean by local space and world space but you can actually apply force on a rigidbody. From your ref on the Rigidbody
component just call colliderRef.current.applyImpulse(new Vector3(0, 1, 0));
If you want more documentation, you can in fact see the original Javascript documentation. This library is just a React implementation of it. https://rapier.rs/docs/api/javascript/JavaScript3D
And the RigidBody class https://rapier.rs/javascript3d/classes/RigidBody.html
Hey!
Can you explain a bit more what you are expecting from this?