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
Afficher le fichier Open project: scastle/Solitude

Méthodes publiques

Свойство Type Description
LimitAngularVelocity bool
LimitLinearVelocity bool

Méthodes publiques

Méthode 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 méthode

public AddBody ( Body body ) : void
body Project290.Physics.Dynamics.Body
Résultat void

Update() public méthode

public Update ( float dt ) : void
dt float
Résultat void

VelocityLimitController() public méthode

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
Résultat System

VelocityLimitController() public méthode

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.
Résultat System

Property Details

LimitAngularVelocity public_oe property

public bool LimitAngularVelocity
Résultat bool

LimitLinearVelocity public_oe property

public bool LimitLinearVelocity
Résultat bool