Enfusion Script API
|
Hinge joint simulation. More...
Public Member Functions | |
proto external void | SetLimits (float low, float high, float softness, float biasFactor, float relaxationFactor) |
Sets various joint parameters. | |
proto external void | SetMotorTargetAngle (float angle, float dt, float maxImpulse) |
Allows motor to move hinge to specific angle. | |
proto external void | SetMotor (bool enable, float targetVelocity, float maxImpulse) |
Allows motor to move hinge at specific velocity. | |
proto external void | SetAxis (vector axis) |
Sets new axis of the hinge joint. | |
Public Member Functions inherited from PhysicsJoint | |
proto external void | Destroy () |
Destroys joint. | |
Public Member Functions inherited from pointer | |
proto string | ToString () |
Additional Inherited Members | |
Static Public Member Functions inherited from PhysicsJoint | |
static proto PhysicsHingeJoint | CreateHinge (notnull IEntity ent1, IEntity ent2, vector point1, vector axis1, vector point2, vector axis2, bool disableCollisions, float breakThreshold=-1) |
Creates hinge joint. | |
static proto PhysicsHingeJoint | CreateHinge2 (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1) |
Creates hinge joint. | |
static proto PhysicsBallSocketJoint | CreateBallSocket (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1) |
Creates ball socket joint. | |
static proto PhysicsFixedJoint | CreateFixed (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1) |
Creates fixed joint. | |
static proto PhysicsConeTwistJoint | CreateConeTwist (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1) |
Creates cone twist joint. | |
static proto PhysicsSliderJoint | CreateSlider (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1) |
Creates slider joint. | |
static proto Physics6DOFJoint | Create6DOF (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1) |
Creates 6 DOF joint. | |
static proto Physics6DOFSpringJoint | Create6DOFSpring (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1) |
Creates DOF spring joint. | |
Hinge joint simulation.
proto external void PhysicsHingeJoint.SetAxis | ( | vector | axis | ) |
Sets new axis of the hinge joint.
ent1 refers to one in PhysicsJoint.CreateHinge.
axis | New joint axis in reference frame of ent1 |
proto external void PhysicsHingeJoint.SetMotor | ( | bool | enable, |
float | targetVelocity, | ||
float | maxImpulse | ||
) |
Allows motor to move hinge at specific velocity.
enable | True to enable motor |
targetVelocity | Target angular velocity motor tries to maintain |
maxImpulse | Maximum impulse motor can overcome |
proto external void PhysicsHingeJoint.SetMotorTargetAngle | ( | float | angle, |
float | dt, | ||
float | maxImpulse | ||
) |
Allows motor to move hinge to specific angle.
Must be called continuously.
angle | Target angle motor tries to reach |
dt | Time fraction used in update |
maxImpulse | Maximum impulse motor can overcome |