Ctrl+K

FixedMouseJoint

Declaration

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

A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces. NOTE: this joint is not documented in the manual because it was developed to be used in the testbed. If you want to learn how to use the mouse joint, look at the testbed.

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

Constructors

FixedMouseJoint

This requires a world target point, tuning parameters, and the time step.

void FixedMouseJoint(Body body, Vector2 worldAnchor)

Parameters:

Name Type Description
body tainicom.Aether.Physics2D.Dynamics.Body The body.
worldAnchor Strawberry.Math.Vector2 The target.

Properties

LocalAnchorA

The local anchor point on BodyA

Vector2 LocalAnchorA { get set }

WorldAnchorA override

Vector2 WorldAnchorA { get set }

WorldAnchorB override

Vector2 WorldAnchorB { get set }

MaxForce

The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of the weight (multiplier * mass * gravity).

float MaxForce { get set }

Frequency

The response speed.

float Frequency { get set }

DampingRatio

The damping ratio. 0 = no damping, 1 = critical damping.

float DampingRatio { 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