Properly track some user-initiatied rigid-body modifications.

This commit is contained in:
Crozet Sébastien
2020-11-25 16:00:02 +01:00
parent 72eb66425d
commit 2d4e14b869
11 changed files with 159 additions and 141 deletions

View File

@@ -402,7 +402,7 @@ impl PhysxWorld {
pub fn sync(&self, bodies: &mut RigidBodySet, colliders: &mut ColliderSet) {
for (rapier_handle, physx_handle) in self.rapier2physx.iter() {
let mut rb = bodies.get_mut(*rapier_handle).unwrap();
let rb = bodies.get_mut(*rapier_handle).unwrap();
let ra = self.scene.get_rigid_actor(*physx_handle).unwrap();
let pos = ra.get_global_pose().into_na();
let iso = na::convert_unchecked(pos);