|
@@ -96,7 +96,7 @@ void ConveyorBeltTest::OnContactAdded(const Body &inBody1, const Body &inBody2,
|
|
Vec3 body2_angular_surface_velocity = body2_angular? inBody2.GetRotation() * cLocalSpaceAngularVelocity : Vec3::sZero();
|
|
Vec3 body2_angular_surface_velocity = body2_angular? inBody2.GetRotation() * cLocalSpaceAngularVelocity : Vec3::sZero();
|
|
|
|
|
|
// Note that the angular velocity is the angular velocity around body 1's center of mass, so we need to add the linear velocity of body 2's center of mass
|
|
// Note that the angular velocity is the angular velocity around body 1's center of mass, so we need to add the linear velocity of body 2's center of mass
|
|
- Vec3 body2_linear_surface_velocity = body2_angular? (inBody2.GetCenterOfMassPosition() - inBody1.GetCenterOfMassPosition()).Cross(body2_angular_surface_velocity) : Vec3::sZero();
|
|
|
|
|
|
+ Vec3 body2_linear_surface_velocity = body2_angular? Vec3(inBody2.GetCenterOfMassPosition() - inBody1.GetCenterOfMassPosition()).Cross(body2_angular_surface_velocity) : Vec3::sZero();
|
|
|
|
|
|
// Calculate the relative angular surface velocity
|
|
// Calculate the relative angular surface velocity
|
|
ioSettings.mRelativeSurfaceVelocity = body2_linear_surface_velocity;
|
|
ioSettings.mRelativeSurfaceVelocity = body2_linear_surface_velocity;
|