aboutsummaryrefslogtreecommitdiff
path: root/src_testbed/physx_backend.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2020-09-01 17:35:32 +0200
committerSébastien Crozet <developer@crozet.re>2020-09-01 17:35:32 +0200
commitfc0b3bf39484029d956055943b38bb55ab2c5791 (patch)
treecd7855d71e0858ea3c695e9498ed177c87b5c328 /src_testbed/physx_backend.rs
parent2f2a073ce47eaa17f44d88b9dc6cc56362c374e2 (diff)
downloadrapier-fc0b3bf39484029d956055943b38bb55ab2c5791.tar.gz
rapier-fc0b3bf39484029d956055943b38bb55ab2c5791.tar.bz2
rapier-fc0b3bf39484029d956055943b38bb55ab2c5791.zip
Mass properties: add a max number of iterations for the local-frame rotation computation.
Diffstat (limited to 'src_testbed/physx_backend.rs')
-rw-r--r--src_testbed/physx_backend.rs4
1 files changed, 2 insertions, 2 deletions
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(),