C# Class FarseerPhysics.Controllers.VelocityLimitController

Put a limit on the linear (translation - the movespeed) and angular (rotation) velocity of bodies added to this controller.
Inheritance: Controller
Mostra file Open project: prime31/Nez

Public Properties

Property Type Description
LimitAngularVelocity bool
LimitLinearVelocity bool

Public Methods

Method Description
AddBody ( Body body ) : void
RemoveBody ( 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 FarseerPhysics.Dynamics.Body
return void

RemoveBody() public method

public RemoveBody ( Body body ) : void
body FarseerPhysics.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