mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 14:38:13 -05:00
Fix wheel joint steering axis
This commit is contained in:
@@ -347,11 +347,11 @@ public sealed class WheelJoint : Joint
|
||||
{
|
||||
localFrame1 = global::Transform.Zero;
|
||||
localFrame1.Position = point1.LocalPosition;
|
||||
localFrame1.Rotation = point1.LocalRotation * new Angles( 90, 0, 0 );
|
||||
localFrame1.Rotation = point1.LocalRotation * new Angles( 90, 0, 0 ) * new Angles( 0, 90, 0 ); // face the right way, steer the right way
|
||||
|
||||
localFrame2 = global::Transform.Zero;
|
||||
localFrame2.Position = point2.Body.Transform.PointToLocal( point1.Transform.Position );
|
||||
localFrame2.Rotation = point2.Body.Transform.RotationToLocal( point1.Transform.Rotation * new Angles( 90, 0, 0 ) );
|
||||
localFrame2.Rotation = point2.Body.Transform.RotationToLocal( point1.Transform.Rotation * new Angles( 90, 0, 0 ) * new Angles( 0, 90, 0 ) ); // face the right way, steer the right way
|
||||
}
|
||||
|
||||
if ( !Scene.IsEditor )
|
||||
|
||||
Reference in New Issue
Block a user