Always snap to grid
Legacy:KHinge
The native, placeable Hinge joint class.
Contents
Properties[edit]
KarmaConstraint[edit]
- float KDesiredAngle
- 65535 = 360 degrees
- float KAltDesiredAngle
- 65535 = 360 degrees
- float KDesiredAngVel
- 65535 = 1 rotation per second
- EHingeType KHingeType
- float KMaxTorque
- float KProportionalGap
- 65535 = 360 degrees
- float KStiffness
- float KDamping
Hidden[edit]
- bool KUseAltDesired
- Will use KAltDesiredAngle.
- float KCurrentAngle
Enums[edit]
EHingeType[edit]
- HT_Normal
- Will spin freely around the given axis, KDesiredAngle.
- HT_Springy
- The given spin axis is able to move, but will return to normal.
- HT_Motor
- Will constantly spin around the given axis.
- HT_Controlled
- Somewhere between HT_Springy and HT_Motor, where a constant spin is applied to an axis that is able to move.
States[edit]
Default (auto)[edit]
In this state nothing will happen if this hinge is triggered or untriggered.
Ignores Trigger, UnTrigger.
ToggleMotor[edit]
In this state, Trigger will cause the hinge type to change to HT_Motor. Another trigger will toggle it to HT_Controlled, and it will try and maintain its current angle.
Ignores UnTrigger.
Functions[edit]
- Trigger( Actor Other, Pawn EventInstigator )
- If KHingeType == HT_Motor, sets KDesiredAngle = KCurrentAngle, KUseAltDesired = False and KHingeType = HT_Controlled. Otherwise sets KHingeType = HT_Motor. Calls KUpdateConstraintParams() and KConstraintActor1.KWake().
- Begin
- Sets KHingeType = HT_Controlled and KUseAltDesired = False. Calls KUpdateConstraintParams().
ControlMotor[edit]
In this state, Trigger will turn motor on. Untrigger will turn toggle it to HT_Controlled, and it will try and maintain its current angle.
Functions[edit]
- Trigger( Actor Other, Pawn EventInstigator )
- if KHingeType != HT_Motor, sets KHingeType = HT_Motor and calls KUpdateConstraintParams() and KConstraintActor1.KWake().
- UnTrigger( Actor Other, Pawn EventInstigator )
- if KHingeType == HT_Motor, sets KDesiredAngle = KCurrentAngle, KUseAltDesired = False and KHingeType = HT_Controlled, then calls KUpdateConstraintParams() and KConstraintActor1.KWake().
- Begin
- Sets KHingeType = HT_Controlled and KUseAltDesired = False. Calls KUpdateConstraintParams().
ToggleDesired[edit]
In this state a trigger will toggle the hinge between using KDesiredAngle and KAltDesiredAngle. It will use whatever the current KHingeType is to achieve this, so this is only useful with HT_Controlled and HT_Springy.
Ignores Untrigger.
Functions[edit]
- Trigger( Actor Other, Pawn EventInstigator )
- Toggles KUseAltDesired. Calls KUpdateConstraintParams() and KConstraintActor1.KWake().
ControlDesired[edit]
In this state, trigger will cause the hinge to use KAltDesiredAngle, untrigger will caus it to use KAltDesiredAngle.
Functions[edit]
- Trigger( Actor Other, Pawn EventInstigator )
- Sets KUseAltDesired = True and calls KUpdateConstraintParams() and KConstraintActor1.KWake().
- UnTrigger( Actor Other, Pawn EventInstigator )
- Sets KUseAltDesired = False and calls KUpdateConstraintParams() and KConstraintActor1.KWake().