not work
This commit is contained in:
18
Code/Base/Wheel/Suspension/BasicSuspension.cs
Normal file
18
Code/Base/Wheel/Suspension/BasicSuspension.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace VeloX;
|
||||
|
||||
public class BasicSuspension
|
||||
{
|
||||
private readonly Hinge Hinge;
|
||||
|
||||
public BasicSuspension( Vector3 wheel, Vector3 hingeBody, Vector3 hingeWheel )
|
||||
{
|
||||
Vector3 hingePoint = wheel - (hingeWheel - hingeBody);
|
||||
Hinge = new Hinge( hingePoint, hingeWheel - hingeBody );
|
||||
}
|
||||
|
||||
public virtual void GetWheelTransform( float travel, out Rotation rotation, out Vector3 position )
|
||||
{
|
||||
rotation = Rotation.Identity;
|
||||
position = Hinge.Rotate( travel );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user