C# Class Project290.Physics.Controllers.VelocityLimitController

Put a limit on the linear (translation - the movespeed) and angular (rotation) velocity of bodies added to this controller.
Inheritance: Controller
Datei anzeigen Open project: scastle/Solitude

Public Properties

Property Type Description
LimitAngularVelocity bool
LimitLinearVelocity bool

Public Methods

Method Description
AddBody ( Body body ) : void
Update ( float dt ) : void
VelocityLimitController ( ) : System

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

VelocityLimitController ( float maxLinearVelocity, float maxAngularVelocity ) : System

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.

Method Details

AddBody() public method

public AddBody ( Body body ) : void
body Project290.Physics.Dynamics.Body
return void

Update() public method

public Update ( float dt ) : void
dt float
return void

VelocityLimitController() public method

Initializes a new instance of the VelocityLimitController class. Sets the max linear velocity to Settings.MaxTranslation Sets the max angular velocity to Settings.MaxRotation
public VelocityLimitController ( ) : System
return System

VelocityLimitController() public method

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.
public VelocityLimitController ( float maxLinearVelocity, float maxAngularVelocity ) : System
maxLinearVelocity float The max linear velocity.
maxAngularVelocity float The max angular velocity.
return System

Property Details

LimitAngularVelocity public_oe property

public bool LimitAngularVelocity
return bool

LimitLinearVelocity public_oe property

public bool LimitLinearVelocity
return bool