Method | Description | |
---|---|---|
UprightSpring ( Entity entity, Vector3 upVector, float minimumAngle, float maximumAngle, float correctionFactor ) : System |
Constructs a constraint to keep entities upright.
|
Method | Description | |
---|---|---|
IDuringForcesUpdateable ( float dt ) : void |
Updates the upright constraint. Called automatically by its owning space.
|
public UprightSpring ( Entity entity, Vector3 upVector, float minimumAngle, float maximumAngle, float correctionFactor ) : System | ||
entity | Entity | Entity to try to keep upright. |
upVector | Vector3 | Direction to try to orient the entity with. |
minimumAngle | float | Minimum angle between the car's transformed up vector and the actual up vector /// before the constraint begins to apply forces. |
maximumAngle | float | Maximum angle between the car's transformed up vector and the actual up vector /// past which the constraint 'gives up' and lets the entity tumble. |
correctionFactor | float | Factor of the orientation error to apply in angular velocity each frame. |
return | System |