From fc0b3bf39484029d956055943b38bb55ab2c5791 Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Tue, 1 Sep 2020 17:35:32 +0200 Subject: Mass properties: add a max number of iterations for the local-frame rotation computation. --- src_testbed/physx_backend.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src_testbed/physx_backend.rs') diff --git a/src_testbed/physx_backend.rs b/src_testbed/physx_backend.rs index 66036c8..b06fd7e 100644 --- a/src_testbed/physx_backend.rs +++ b/src_testbed/physx_backend.rs @@ -228,7 +228,7 @@ impl PhysxWorld { // Update mass properties. for (rapier_handle, physx_handle) in rapier2physx.iter() { let rb = &bodies[*rapier_handle]; - if let Some(mut ra) = scene.get_dynamic_mut(*physx_handle) { + if let Some(rp) = scene.get_dynamic_mut(*physx_handle) { let densities: Vec<_> = rb .colliders() .iter() @@ -237,7 +237,7 @@ impl PhysxWorld { unsafe { physx_sys::PxRigidBodyExt_updateMassAndInertia_mut( - ra.as_ptr_mut().ptr as *mut physx_sys::PxRigidBody, + rp.as_ptr_mut().ptr as *mut physx_sys::PxRigidBody, densities.as_ptr(), densities.len() as u32, std::ptr::null(), -- cgit