Ctrl+K

VelocityLimitController

Declaration

public class tainicom.Aether.Physics2D.Controllers.VelocityLimitController

Put a limit on the linear (translation - the movespeed) and angular (rotation) velocity of bodies added to this controller.

Inherits: tainicom.Aether.Physics2D.Controllers.Controller

Constructors

VelocityLimitController

Initializes a new instance of the VelocityLimitController class. Sets the max linear velocity to Settings.MaxTranslation Sets the max angular velocity to Settings.MaxRotation

void VelocityLimitController()

VelocityLimitController

Initializes a new instance of the VelocityLimitController class. Pass in 0 or float.MaxValue to disable the limit. maxAngularVelocity = 0 will disable the angular velocity limit.

void VelocityLimitController(float maxLinearVelocity, float maxAngularVelocity)

Parameters:

Name Type Description
maxLinearVelocity System.Single The max linear velocity.
maxAngularVelocity System.Single The max angular velocity.

Properties

MaxAngularVelocity

Gets or sets the max angular velocity.

float MaxAngularVelocity { get set }

Value: The max angular velocity.

MaxLinearVelocity

Gets or sets the max linear velocity.

float MaxLinearVelocity { get set }

Value: The max linear velocity.

Fields

LimitAngularVelocity

bool LimitAngularVelocity

LimitLinearVelocity

bool LimitLinearVelocity

Methods

Update override

void Update(float dt)

Parameters:

Name Type Description
dt System.Single

AddBody

void AddBody(Body body)

Parameters:

Name Type Description
body tainicom.Aether.Physics2D.Dynamics.Body

RemoveBody

void RemoveBody(Body body)

Parameters:

Name Type Description
body tainicom.Aether.Physics2D.Dynamics.Body