Ctrl+K

WheelJoint

Declaration

public class tainicom.Aether.Physics2D.Dynamics.Joints.WheelJoint

A wheel joint. This joint provides two degrees of freedom: translation along an axis fixed in bodyA and rotation in the plane. You can use a joint limit to restrict the range of motion and a joint motor to drive the rotation or to model rotational friction. This joint is designed for vehicle suspensions.

Inherits: tainicom.Aether.Physics2D.Dynamics.Joints.Joint

Constructors

WheelJoint

Constructor for WheelJoint

void WheelJoint(Body bodyA, Body bodyB, Vector2 anchor, Vector2 axis, bool useWorldCoordinates = false)

Parameters:

Name Type Description
bodyA tainicom.Aether.Physics2D.Dynamics.Body The first body
bodyB tainicom.Aether.Physics2D.Dynamics.Body The second body
anchor Strawberry.Math.Vector2 The anchor point
axis Strawberry.Math.Vector2 The axis
useWorldCoordinates System.Boolean = false Set to true if you are using world coordinates as anchors.

Properties

LocalAnchorA

The local anchor point on BodyA

Vector2 LocalAnchorA { get set }

LocalAnchorB

The local anchor point on BodyB

Vector2 LocalAnchorB { get set }

WorldAnchorA override

Vector2 WorldAnchorA { get set }

WorldAnchorB override

Vector2 WorldAnchorB { get set }

Axis

The axis at which the suspension moves.

Vector2 Axis { get set }

LocalXAxis

The axis in local coordinates relative to BodyA

Vector2 LocalXAxis { get }

MotorSpeed

The desired motor speed in radians per second.

float MotorSpeed { get set }

MaxMotorTorque

The maximum motor torque, usually in N-m.

float MaxMotorTorque { get set }

Frequency

Suspension frequency, zero indicates no suspension

float Frequency { get set }

DampingRatio

Suspension damping ratio, one indicates critical damping

float DampingRatio { get set }

JointTranslation

Gets the translation along the axis

float JointTranslation { get }

JointSpeed

Gets the angular velocity of the joint

float JointSpeed { get }

MotorEnabled

Enable/disable the joint motor.

bool MotorEnabled { get set }

Methods

GetMotorTorque

Gets the torque of the motor

float GetMotorTorque(float invDt)

Parameters:

Name Type Description
invDt System.Single inverse delta time

GetReactionForce override

Vector2 GetReactionForce(float invDt)

Parameters:

Name Type Description
invDt System.Single

GetReactionTorque override

float GetReactionTorque(float invDt)

Parameters:

Name Type Description
invDt System.Single