Fix the compilation of tests.

This commit is contained in:
Crozet Sébastien
2021-02-23 16:26:02 +01:00
parent 0f0f2c344f
commit a60c6e5fdd
3 changed files with 6 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ impl PhysicsHooks for OneWayPlatformHook {
context.update_as_oneway_platform(&allowed_local_n1, 0.1); context.update_as_oneway_platform(&allowed_local_n1, 0.1);
// Set the surface velocity of the accepted contacts. // 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 || context.collider_handle2 == self.platform2
{ {
-12.0 -12.0
@@ -56,7 +56,7 @@ impl PhysicsHooks for OneWayPlatformHook {
}; };
for contact in context.solver_contacts.iter_mut() { for contact in context.solver_contacts.iter_mut() {
contact.surface_velocity.x = surface_velocity; contact.tangent_velocity.x = tangent_velocity;
} }
} }
} }

View File

@@ -47,7 +47,7 @@ impl PhysicsHooks for OneWayPlatformHook {
context.update_as_oneway_platform(&allowed_local_n1, 0.1); context.update_as_oneway_platform(&allowed_local_n1, 0.1);
// Set the surface velocity of the accepted contacts. // 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 || context.collider_handle2 == self.platform2
{ {
-12.0 -12.0
@@ -56,7 +56,7 @@ impl PhysicsHooks for OneWayPlatformHook {
}; };
for contact in context.solver_contacts.iter_mut() { for contact in context.solver_contacts.iter_mut() {
contact.surface_velocity.z = surface_velocity; contact.tangent_velocity.z = tangent_velocity;
} }
} }
} }

View File

@@ -278,8 +278,7 @@ mod test {
&mut bodies, &mut bodies,
&mut colliders, &mut colliders,
&mut joints, &mut joints,
None, &(),
None,
&(), &(),
); );
} }
@@ -322,8 +321,7 @@ mod test {
&mut bodies, &mut bodies,
&mut colliders, &mut colliders,
&mut joints, &mut joints,
None, &(),
None,
&(), &(),
); );
} }