#include <PhysicsHingeConstraint.h>
Public Member Functions | |
void | setLimits (float minAngle, float maxAngle, float bounciness=1.0f) |
Defines a hinge constraint between two rigid bodies (or one rigid body and the world) where movement is restricted to rotation about one axis.
void gameplay::PhysicsHingeConstraint::setLimits | ( | float | minAngle, |
float | maxAngle, | ||
float | bounciness = 1.0f |
||
) |
Sets the limits (and optionally, some properties) for the hinge.
minAngle | The minimum angle for the hinge. |
maxAngle | The maximum angle for the hinge. |
bounciness | The bounciness of the hinge (this is applied as a factor to the incoming velocity when a hinge limit is met in order to calculate the outgoing velocity-for example, 0.0 corresponds to no bounce and 1.0 corresponds to an outgoing velocity that is equal in magnitude to the incoming velocity). |