From ee10a90f9bb2a1b3c045c41aeb7569123891e757 Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sat, 9 Jul 2022 12:54:51 +0200 Subject: Release v0.14 --- src_testbed/physx_backend.rs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src_testbed/physx_backend.rs') diff --git a/src_testbed/physx_backend.rs b/src_testbed/physx_backend.rs index 0a839b9..d4b2a75 100644 --- a/src_testbed/physx_backend.rs +++ b/src_testbed/physx_backend.rs @@ -78,10 +78,20 @@ impl IntoPhysx for Point3 { } } +impl IntoPhysx for UnitQuaternion { + type Output = PxQuat; + fn into_physx(self) -> Self::Output { + PxQuat::new(self.i, self.j, self.k, self.w) + } +} + impl IntoPhysx for Isometry3 { type Output = PxTransform; fn into_physx(self) -> Self::Output { - self.into_glam().into() + PxTransform::from_translation_rotation( + &self.translation.vector.into_physx(), + &self.rotation.into_physx(), + ) } } @@ -164,7 +174,7 @@ impl PhysxWorld { gravity: gravity.into_physx(), thread_count: num_threads as u32, broad_phase_type: BroadPhaseType::AutomaticBoxPruning, - solver_type: SolverType::PGS, + solver_type: SolverType::Pgs, friction_type, ccd_max_passes: integration_parameters.max_ccd_substeps as u32, ..SceneDescriptor::new(()) @@ -361,7 +371,7 @@ impl PhysxWorld { if rb.is_ccd_enabled() { physx_sys::PxRigidBody_setRigidBodyFlag_mut( actor, - RigidBodyFlag::EnableCCD as u32, + RigidBodyFlag::EnableCcd as u32, true, ); } -- cgit