Add a simpler to lock the rotation or translation of a dynamic rigid-body.
This commit is contained in:
@@ -158,7 +158,7 @@ impl NPhysicsWorld {
|
||||
|
||||
pub fn sync(&self, bodies: &mut RigidBodySet, colliders: &mut ColliderSet) {
|
||||
for (rapier_handle, nphysics_handle) in self.rapier2nphysics.iter() {
|
||||
let mut rb = bodies.get_mut(*rapier_handle).unwrap();
|
||||
let rb = bodies.get_mut(*rapier_handle).unwrap();
|
||||
let ra = self.bodies.rigid_body(*nphysics_handle).unwrap();
|
||||
let pos = *ra.position();
|
||||
rb.set_position(pos, false);
|
||||
|
||||
Reference in New Issue
Block a user