Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PhysicsHingeJoint Interface Reference

Hinge joint simulation. More...

Inheritance diagram for PhysicsHingeJoint:
[legend]

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.
 

Detailed Description

Hinge joint simulation.

Member Function Documentation

◆ SetAxis()

proto external void PhysicsHingeJoint.SetAxis ( vector  axis)

Sets new axis of the hinge joint.

ent1 refers to one in PhysicsJoint.CreateHinge.

Parameters
axisNew joint axis in reference frame of ent1

◆ SetLimits()

proto external void PhysicsHingeJoint.SetLimits ( float  low,
float  high,
float  softness,
float  biasFactor,
float  relaxationFactor 
)

Sets various joint parameters.

Parameters
lowLow limit of the joint
highHigh limit of the joint
softnessSoftness of the joint. See details
biasFactorBias factor of the joint. See details
relaxationFactorRelaxation factor of the joint. See details

◆ SetMotor()

proto external void PhysicsHingeJoint.SetMotor ( bool  enable,
float  targetVelocity,
float  maxImpulse 
)

Allows motor to move hinge at specific velocity.

Parameters
enableTrue to enable motor
targetVelocityTarget angular velocity motor tries to maintain
maxImpulseMaximum impulse motor can overcome

◆ SetMotorTargetAngle()

proto external void PhysicsHingeJoint.SetMotorTargetAngle ( float  angle,
float  dt,
float  maxImpulse 
)

Allows motor to move hinge to specific angle.

Must be called continuously.

Parameters
angleTarget angle motor tries to reach
dtTime fraction used in update
maxImpulseMaximum impulse motor can overcome

The documentation for this interface was generated from the following file: