diff options
| author | Crozet Sébastien <developer@crozet.re> | 2021-02-23 16:26:02 +0100 |
|---|---|---|
| committer | Crozet Sébastien <developer@crozet.re> | 2021-02-23 16:26:02 +0100 |
| commit | a60c6e5fddbf18df8295c0055ebda772b3bb6f60 (patch) | |
| tree | c26397c7a82db860bb28bda6e763f31cc48975be | |
| parent | 0f0f2c344fd78c3d1ca9ec07d3523c5d0ea10c82 (diff) | |
| download | rapier-a60c6e5fddbf18df8295c0055ebda772b3bb6f60.tar.gz rapier-a60c6e5fddbf18df8295c0055ebda772b3bb6f60.tar.bz2 rapier-a60c6e5fddbf18df8295c0055ebda772b3bb6f60.zip | |
Fix the compilation of tests.
| -rw-r--r-- | examples2d/one_way_platforms2.rs | 4 | ||||
| -rw-r--r-- | examples3d/one_way_platforms3.rs | 4 | ||||
| -rw-r--r-- | src/pipeline/physics_pipeline.rs | 6 |
3 files changed, 6 insertions, 8 deletions
diff --git a/examples2d/one_way_platforms2.rs b/examples2d/one_way_platforms2.rs index 2e1788e..551eaf1 100644 --- a/examples2d/one_way_platforms2.rs +++ b/examples2d/one_way_platforms2.rs @@ -47,7 +47,7 @@ impl PhysicsHooks for OneWayPlatformHook { context.update_as_oneway_platform(&allowed_local_n1, 0.1); // Set the surface velocity of the accepted contacts. - let surface_velocity = if context.collider_handle1 == self.platform1 + let tangent_velocity = if context.collider_handle1 == self.platform1 || context.collider_handle2 == self.platform2 { -12.0 @@ -56,7 +56,7 @@ impl PhysicsHooks for OneWayPlatformHook { }; for contact in context.solver_contacts.iter_mut() { - contact.surface_velocity.x = surface_velocity; + contact.tangent_velocity.x = tangent_velocity; } } } diff --git a/examples3d/one_way_platforms3.rs b/examples3d/one_way_platforms3.rs index ea70e69..173d03d 100644 --- a/examples3d/one_way_platforms3.rs +++ b/examples3d/one_way_platforms3.rs @@ -47,7 +47,7 @@ impl PhysicsHooks for OneWayPlatformHook { context.update_as_oneway_platform(&allowed_local_n1, 0.1); // Set the surface velocity of the accepted contacts. - let surface_velocity = if context.collider_handle1 == self.platform1 + let tangent_velocity = if context.collider_handle1 == self.platform1 || context.collider_handle2 == self.platform2 { -12.0 @@ -56,7 +56,7 @@ impl PhysicsHooks for OneWayPlatformHook { }; for contact in context.solver_contacts.iter_mut() { - contact.surface_velocity.z = surface_velocity; + contact.tangent_velocity.z = tangent_velocity; } } } diff --git a/src/pipeline/physics_pipeline.rs b/src/pipeline/physics_pipeline.rs index e92fb08..198c4be 100644 --- a/src/pipeline/physics_pipeline.rs +++ b/src/pipeline/physics_pipeline.rs @@ -278,8 +278,7 @@ mod test { &mut bodies, &mut colliders, &mut joints, - None, - None, + &(), &(), ); } @@ -322,8 +321,7 @@ mod test { &mut bodies, &mut colliders, &mut joints, - None, - None, + &(), &(), ); } |
