Ctrl+K

MotorJoint

Declaration

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

A motor joint is used to control the relative motion between two bodies. A typical usage is to control the movement of a dynamic body with respect to the ground.

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

Constructors

MotorJoint

Constructor for MotorJoint.

void MotorJoint(Body bodyA, Body bodyB, 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
useWorldCoordinates System.Boolean = false Set to true if you are using world coordinates as anchors.

Properties

WorldAnchorA override

Vector2 WorldAnchorA { get set }

WorldAnchorB override

Vector2 WorldAnchorB { get set }

MaxForce

The maximum amount of force that can be applied to BodyA

float MaxForce { get set }

MaxTorque

The maximum amount of torque that can be applied to BodyA

float MaxTorque { get set }

LinearOffset

The linear (translation) offset.

Vector2 LinearOffset { get set }

AngularOffset

Get or set the angular offset.

float AngularOffset { get set }

Methods

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