G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
ConstraintInstance Namespace Reference

Functions

Physics|Constraints
void GetProjectionParams (FConstraintInstanceAccessor &Accessor, bool &bEnableProjection, float32 &ProjectionLinearAlpha, float32 &ProjectionAngularAlpha)
 Gets projection parameters of the constraint.
void GetAngularBreakable (FConstraintInstanceAccessor &Accessor, bool &bAngularBreakable, float32 &AngularBreakThreshold)
 Gets Constraint Angular Breakable properties.
void GetAngularDriveMode (FConstraintInstanceAccessor &Accessor, EAngularDriveMode &OutDriveMode)
 Gets the angular drive mode ( SLERP or Twist And Swing).
void GetAngularDriveParams (FConstraintInstanceAccessor &Accessor, float32 &OutPositionStrength, float32 &OutVelocityStrength, float32 &OutForceLimit)
 Gets the drive params for the angular drive.
void GetAngularLimits (FConstraintInstanceAccessor &Accessor, EAngularConstraintMotion &Swing1MotionType, float32 &Swing1LimitAngle, EAngularConstraintMotion &Swing2MotionType, float32 &Swing2LimitAngle, EAngularConstraintMotion &TwistMotionType, float32 &TwistLimitAngle)
 Gets Constraint Angular Motion Ranges.
void GetAngularOrientationTarget (FConstraintInstanceAccessor &Accessor, FRotator &OutPosTarget)
 Gets the target orientation for the angular drive.
void GetAngularPlasticity (FConstraintInstanceAccessor &Accessor, bool &bAngularPlasticity, float32 &AngularPlasticityThreshold)
 Sets Constraint Angular Plasticity properties.
void GetAngularSoftSwingLimitParams (FConstraintInstanceAccessor &Accessor, bool &bSoftSwingLimit, float32 &SwingLimitStiffness, float32 &SwingLimitDamping, float32 &SwingLimitRestitution, float32 &SwingLimitContactDistance)
 Gets Constraint Angular Soft Swing Limit parameters.
void GetAngularSoftTwistLimitParams (FConstraintInstanceAccessor &Accessor, bool &bSoftTwistLimit, float32 &TwistLimitStiffness, float32 &TwistLimitDamping, float32 &TwistLimitRestitution, float32 &TwistLimitContactDistance)
 Gets Constraint Angular Soft Twist Limit parameters.
void GetAngularVelocityDriveSLERP (FConstraintInstanceAccessor &Accessor, bool &bOutEnableSLERP)
 Gets whether the angular velocity slerp drive is enabled or not. Only relevant if the AngularDriveMode is set to SLERP.
void GetAngularVelocityDriveTwistAndSwing (FConstraintInstanceAccessor &Accessor, bool &bOutEnableTwistDrive, bool &bOutEnableSwingDrive)
 Gets whether angular velocity twist and swing drive is enabled or not. Only relevant if the AngularDriveMode is set to Twist and Swing.
void GetAngularVelocityTarget (FConstraintInstanceAccessor &Accessor, FVector &OutVelTarget)
 Gets the target velocity for the angular drive.
void GetAttachedBodyNames (FConstraintInstanceAccessor &Accessor, FName &ParentBody, FName &ChildBody)
 Gets Attached body names.
void GetContactTransferScale (FConstraintInstanceAccessor &Accessor, float32 &ContactTransferScale)
 Gets Constraint Contact Transfer Scale properties.
bool GetDisableCollsion (FConstraintInstanceAccessor &Accessor)
 Gets whether bodies attched to the constraint can collide or not.
void GetLinearBreakable (FConstraintInstanceAccessor &Accessor, bool &bLinearBreakable, float32 &LinearBreakThreshold)
 Gets Constraint Linear Breakable properties.
void GetLinearDriveParams (FConstraintInstanceAccessor &Accessor, float32 &OutPositionStrength, float32 &OutVelocityStrength, float32 &OutForceLimit)
 Gets the drive params for the linear drive.
void GetLinearLimits (FConstraintInstanceAccessor &Accessor, ELinearConstraintMotion &XMotion, ELinearConstraintMotion &YMotion, ELinearConstraintMotion &ZMotion, float32 &Limit)
 Gets Constraint Linear Motion Ranges.
void GetLinearPlasticity (FConstraintInstanceAccessor &Accessor, bool &bLinearPlasticity, float32 &LinearPlasticityThreshold, EConstraintPlasticityType &PlasticityType)
 Gets Constraint Linear Plasticity properties.
void GetLinearPositionDrive (FConstraintInstanceAccessor &Accessor, bool &bOutEnableDriveX, bool &bOutEnableDriveY, bool &bOutEnableDriveZ)
 Gets whether linear position drive is enabled or not.
void GetLinearPositionTarget (FConstraintInstanceAccessor &Accessor, FVector &OutPosTarget)
 Gets the target position for the linear drive.
void GetLinearSoftLimitParams (FConstraintInstanceAccessor &Accessor, bool &bSoftLinearLimit, float32 &LinearLimitStiffness, float32 &LinearLimitDamping, float32 &LinearLimitRestitution, float32 &LinearLimitContactDistance)
 Gets Constraint Linear Soft Limit parameters.
void GetLinearVelocityDrive (FConstraintInstanceAccessor &Accessor, bool &bOutEnableDriveX, bool &bOutEnableDriveY, bool &bOutEnableDriveZ)
 Gets whether linear velocity drive is enabled or not.
void GetLinearVelocityTarget (FConstraintInstanceAccessor &Accessor, FVector &OutVelTarget)
 Gets the target velocity for the linear drive.
bool GetMassConditioningEnabled (FConstraintInstanceAccessor &Accessor)
 @brief Gets whether mass conditioning is enabled for the constraint.
void GetOrientationDriveSLERP (FConstraintInstanceAccessor &Accessor, bool &bOutEnableSLERP)
 Gets whether the angular orientation slerp drive is enabled or not. Only relevant if the AngularDriveMode is set to SLERP.
void GetOrientationDriveTwistAndSwing (FConstraintInstanceAccessor &Accessor, bool &bOutEnableTwistDrive, bool &bOutEnableSwingDrive)
 Gets whether angular orientation drive are enabled. Only relevant if the AngularDriveMode is set to Twist and Swing.
bool GetParentDominates (FConstraintInstanceAccessor &Accessor)
 Gets whether the parent body is not affected by it's child motion.
void CopyParams (FConstraintInstanceAccessor &Accessor, FConstraintInstanceAccessor &SourceAccessor, bool bKeepPosition=true, bool bKeepRotation=true)
 Copies all properties from one constraint to another.
void SetAngularBreakable (FConstraintInstanceAccessor &Accessor, bool bAngularBreakable, float32 AngularBreakThreshold)
 Sets Constraint Angular Breakable properties.
void SetAngularDriveMode (FConstraintInstanceAccessor &Accessor, EAngularDriveMode DriveMode)
 Switches the angular drive mode between SLERP and Twist And Swing.
void SetAngularDriveParams (FConstraintInstanceAccessor &Accessor, float32 PositionStrength, float32 VelocityStrength, float32 InForceLimit)
 Sets the drive params for the angular drive.
void SetAngularLimits (FConstraintInstanceAccessor &Accessor, EAngularConstraintMotion Swing1MotionType, float32 Swing1LimitAngle, EAngularConstraintMotion Swing2MotionType, float32 Swing2LimitAngle, EAngularConstraintMotion TwistMotionType, float32 TwistLimitAngle)
 Sets COnstraint Angular Motion Ranges.
void SetAngularOrientationTarget (FConstraintInstanceAccessor &Accessor, FRotator InPosTarget)
 Sets the target orientation for the angular drive.
void SetAngularPlasticity (FConstraintInstanceAccessor &Accessor, bool bAngularPlasticity, float32 AngularPlasticityThreshold)
 Sets Constraint Angular Plasticity properties.
void SetAngularSoftSwingLimitParams (FConstraintInstanceAccessor &Accessor, bool bSoftSwingLimit, float32 SwingLimitStiffness, float32 SwingLimitDamping, float32 SwingLimitRestitution, float32 SwingLimitContactDistance)
 Sets Constraint Angular Soft Swing Limit parameters.
void SetAngularSoftTwistLimitParams (FConstraintInstanceAccessor &Accessor, bool bSoftTwistLimit, float32 TwistLimitStiffness, float32 TwistLimitDamping, float32 TwistLimitRestitution, float32 TwistLimitContactDistance)
 Sets Constraint Angular Soft Twist Limit parameters.
void SetAngularVelocityDriveSLERP (FConstraintInstanceAccessor &Accessor, bool bEnableSLERP)
 Enables/Disables the angular velocity slerp drive. Only relevant if the AngularDriveMode is set to SLERP.
void SetAngularVelocityDriveTwistAndSwing (FConstraintInstanceAccessor &Accessor, bool bEnableTwistDrive, bool bEnableSwingDrive)
 Enables/Disables angular velocity twist and swing drive. Only relevant if the AngularDriveMode is set to Twist and Swing.
void SetAngularVelocityTarget (FConstraintInstanceAccessor &Accessor, FVector InVelTarget)
 Sets the target velocity for the angular drive.
void SetContactTransferScale (FConstraintInstanceAccessor &Accessor, float32 ContactTransferScale)
 Set Contact Transfer Scale.
void SetDisableCollision (FConstraintInstanceAccessor &Accessor, bool bDisableCollision)
 Sets whether bodies attched to the constraint can collide or not.
void SetLinearBreakable (FConstraintInstanceAccessor &Accessor, bool bLinearBreakable, float32 LinearBreakThreshold)
 Sets the Linear Breakable properties.
void SetLinearDriveParams (FConstraintInstanceAccessor &Accessor, float32 PositionStrength, float32 VelocityStrength, float32 InForceLimit)
 Sets the drive params for the linear drive.
void SetLinearLimits (FConstraintInstanceAccessor &Accessor, ELinearConstraintMotion XMotion, ELinearConstraintMotion YMotion, ELinearConstraintMotion ZMotion, float32 Limit)
 Sets Constraint Linear Motion Ranges.
void SetLinearPlasticity (FConstraintInstanceAccessor &Accessor, bool bLinearPlasticity, float32 LinearPlasticityThreshold, EConstraintPlasticityType PlasticityType)
 Sets Constraint Linear Plasticity properties.
void SetLinearPositionDrive (FConstraintInstanceAccessor &Accessor, bool bEnableDriveX, bool bEnableDriveY, bool bEnableDriveZ)
 Enables/Disables linear position drive.
void SetLinearPositionTarget (FConstraintInstanceAccessor &Accessor, FVector InPosTarget)
 Sets the target position for the linear drive.
void SetLinearSoftLimitParams (FConstraintInstanceAccessor &Accessor, bool bSoftLinearLimit, float32 LinearLimitStiffness, float32 LinearLimitDamping, float32 LinearLimitRestitution, float32 LinearLimitContactDistance)
 Sets Constraint Linear Soft Limit parameters.
void SetLinearVelocityDrive (FConstraintInstanceAccessor &Accessor, bool bEnableDriveX, bool bEnableDriveY, bool bEnableDriveZ)
 Enables/Disables linear velocity drive.
void SetLinearVelocityTarget (FConstraintInstanceAccessor &Accessor, FVector InVelTarget)
 Sets the target velocity for the linear drive.
void SetMassConditioningEnabled (FConstraintInstanceAccessor &Accessor, bool bEnableMassConditioning)
 @brief Enable or disable mass conditioning for the constraint.
void SetOrientationDriveSLERP (FConstraintInstanceAccessor &Accessor, bool bEnableSLERP)
 Enables/Disables the angular orientation slerp drive. Only relevant if the AngularDriveMode is set to SLERP.
void SetOrientationDriveTwistAndSwing (FConstraintInstanceAccessor &Accessor, bool bEnableTwistDrive, bool bEnableSwingDrive)
 Enables/Disables angular orientation drive. Only relevant if the AngularDriveMode is set to Twist and Swing.
void SetParentDominates (FConstraintInstanceAccessor &Accessor, bool bParentDominates)
 Sets whether the parent body is not affected by it's child motion.
void SetProjectionParams (FConstraintInstanceAccessor &Accessor, bool bEnableProjection, float32 ProjectionLinearAlpha, float32 ProjectionAngularAlpha)
 Sets projection parameters of the constraint.

Function Documentation

◆ CopyParams()

void CopyParams ( FConstraintInstanceAccessor & Accessor,
FConstraintInstanceAccessor & SourceAccessor,
bool bKeepPosition = true,
bool bKeepRotation = true )

Copies all properties from one constraint to another.

Parameters
AccessorConstraint accessor to write to
SourceAccessorConstraint accessor to read from
bKeepPositionWhether to keep original constraint positions
bKeepRotationWhether to keep original constraint rotations

◆ GetAngularBreakable()

void GetAngularBreakable ( FConstraintInstanceAccessor & Accessor,
bool & bAngularBreakable,
float32 & AngularBreakThreshold )

Gets Constraint Angular Breakable properties.

Parameters
AccessorConstraint accessor to query
bAngularBreakableWhether it is possible to break the joint with angular force
AngularBreakThresholdTorque needed to break the joint

◆ GetAngularDriveMode()

void GetAngularDriveMode ( FConstraintInstanceAccessor & Accessor,
EAngularDriveMode & OutDriveMode )

Gets the angular drive mode ( SLERP or Twist And Swing).

Parameters
AccessorConstraint accessor to query
OutDriveModeThe angular drive mode to use. SLERP uses shortest spherical path, but will not work if any angular constraints are locked. Twist and Swing decomposes the path into the different angular degrees of freedom but may experience gimbal lock

◆ GetAngularDriveParams()

void GetAngularDriveParams ( FConstraintInstanceAccessor & Accessor,
float32 & OutPositionStrength,
float32 & OutVelocityStrength,
float32 & OutForceLimit )

Gets the drive params for the angular drive.

Parameters
AccessorConstraint accessor to query
OutPositionStrengthPositional strength for the drive (stiffness)
OutVelocityStrengthVelocity strength of the drive (damping)
OutForceLimitMax force applied by the drive

◆ GetAngularLimits()

void GetAngularLimits ( FConstraintInstanceAccessor & Accessor,
EAngularConstraintMotion & Swing1MotionType,
float32 & Swing1LimitAngle,
EAngularConstraintMotion & Swing2MotionType,
float32 & Swing2LimitAngle,
EAngularConstraintMotion & TwistMotionType,
float32 & TwistLimitAngle )

Gets Constraint Angular Motion Ranges.

Parameters
AccessorConstraint accessor to query
Swing1MotionTypeType of swing motion ( first axis )
Swing1LimitAngleSize of limit in degrees in [0, 180] range
Swing2MotionTypeType of swing motion ( second axis )
Swing2LimitAngleSize of limit in degrees in [0, 180] range
TwistMotionTypeType of twist motion
TwistLimitAngleSize of limit in degrees in [0, 180] range

◆ GetAngularOrientationTarget()

void GetAngularOrientationTarget ( FConstraintInstanceAccessor & Accessor,
FRotator & OutPosTarget )

Gets the target orientation for the angular drive.

Parameters
AccessorConstraint accessor to query
OutPosTargetTarget orientation

◆ GetAngularPlasticity()

void GetAngularPlasticity ( FConstraintInstanceAccessor & Accessor,
bool & bAngularPlasticity,
float32 & AngularPlasticityThreshold )

Sets Constraint Angular Plasticity properties.

Parameters
AccessorConstraint accessor to query
bAngularPlasticityWhether it is possible to reset the target angle from the angular displacement
AngularPlasticityThresholdDegrees needed to reset the rest state of the joint

◆ GetAngularSoftSwingLimitParams()

void GetAngularSoftSwingLimitParams ( FConstraintInstanceAccessor & Accessor,
bool & bSoftSwingLimit,
float32 & SwingLimitStiffness,
float32 & SwingLimitDamping,
float32 & SwingLimitRestitution,
float32 & SwingLimitContactDistance )

Gets Constraint Angular Soft Swing Limit parameters.

Parameters
AccessorConstraint accessor to query *
bSoftSwingLimitTrue is the swing limit is soft
SwingLimitStiffnessStiffness of the soft swing limit. Only used when Soft limit is on ( positive value )
SwingLimitDampingDamping of the soft swing limit. Only used when Soft limit is on ( positive value )
SwingLimitRestitutionControls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.
SwingLimitContactDistanceDetermines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

◆ GetAngularSoftTwistLimitParams()

void GetAngularSoftTwistLimitParams ( FConstraintInstanceAccessor & Accessor,
bool & bSoftTwistLimit,
float32 & TwistLimitStiffness,
float32 & TwistLimitDamping,
float32 & TwistLimitRestitution,
float32 & TwistLimitContactDistance )

Gets Constraint Angular Soft Twist Limit parameters.

Parameters
AccessorConstraint accessor to query *
bSoftTwistLimitTrue is the Twist limit is soft
TwistLimitStiffnessStiffness of the soft Twist limit. Only used when Soft limit is on ( positive value )
TwistLimitDampingDamping of the soft Twist limit. Only used when Soft limit is on ( positive value )
TwistLimitRestitutionControls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.
TwistLimitContactDistanceDetermines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

◆ GetAngularVelocityDriveSLERP()

void GetAngularVelocityDriveSLERP ( FConstraintInstanceAccessor & Accessor,
bool & bOutEnableSLERP )

Gets whether the angular velocity slerp drive is enabled or not. Only relevant if the AngularDriveMode is set to SLERP.

Parameters
AccessorConstraint accessor to query
bOutEnableSLERPIndicates whether the SLERP drive is enabled. Only relevant if the AngularDriveMode is set to SLERP

◆ GetAngularVelocityDriveTwistAndSwing()

void GetAngularVelocityDriveTwistAndSwing ( FConstraintInstanceAccessor & Accessor,
bool & bOutEnableTwistDrive,
bool & bOutEnableSwingDrive )

Gets whether angular velocity twist and swing drive is enabled or not. Only relevant if the AngularDriveMode is set to Twist and Swing.

Parameters
AccessorConstraint accessor to query
bOutEnableTwistDriveIndicates whether the drive for the twist axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing
bOutEnableSwingDriveIndicates whether the drive for the swing axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

◆ GetAngularVelocityTarget()

void GetAngularVelocityTarget ( FConstraintInstanceAccessor & Accessor,
FVector & OutVelTarget )

Gets the target velocity for the angular drive.

Parameters
AccessorConstraint accessor to query
OutVelTargetTarget velocity

◆ GetAttachedBodyNames()

void GetAttachedBodyNames ( FConstraintInstanceAccessor & Accessor,
FName & ParentBody,
FName & ChildBody )

Gets Attached body names.

Parameters
AccessorConstraint accessor to query
ParentBodyParent body name of the constraint
ChildBodyChild body name of the constraint

◆ GetContactTransferScale()

void GetContactTransferScale ( FConstraintInstanceAccessor & Accessor,
float32 & ContactTransferScale )

Gets Constraint Contact Transfer Scale properties.

Parameters
AccessorConstraint accessor to query
ContactTransferScaleScale for transfer of child energy to parent.

◆ GetDisableCollsion()

bool GetDisableCollsion ( FConstraintInstanceAccessor & Accessor)

Gets whether bodies attched to the constraint can collide or not.

Parameters
AccessorConstraint accessor to query

◆ GetLinearBreakable()

void GetLinearBreakable ( FConstraintInstanceAccessor & Accessor,
bool & bLinearBreakable,
float32 & LinearBreakThreshold )

Gets Constraint Linear Breakable properties.

Parameters
AccessorConstraint accessor to query
bLinearBreakableWhether it is possible to break the joint with linear force
LinearBreakThresholdForce needed to break the joint

◆ GetLinearDriveParams()

void GetLinearDriveParams ( FConstraintInstanceAccessor & Accessor,
float32 & OutPositionStrength,
float32 & OutVelocityStrength,
float32 & OutForceLimit )

Gets the drive params for the linear drive.

Parameters
AccessorConstraint accessor to query
OutPositionStrengthPositional strength for the drive (stiffness)
OutVelocityStrengthVelocity strength of the drive (damping)
OutForceLimitMax force applied by the drive

◆ GetLinearLimits()

void GetLinearLimits ( FConstraintInstanceAccessor & Accessor,
ELinearConstraintMotion & XMotion,
ELinearConstraintMotion & YMotion,
ELinearConstraintMotion & ZMotion,
float32 & Limit )

Gets Constraint Linear Motion Ranges.

Parameters
AccessorConstraint accessor to query
XMotionType of motion along the X axis
YMotionType of motion along the Y axis
ZMotionType of motion along the Z axis
Limitlinear limit applied to all axis

◆ GetLinearPlasticity()

void GetLinearPlasticity ( FConstraintInstanceAccessor & Accessor,
bool & bLinearPlasticity,
float32 & LinearPlasticityThreshold,
EConstraintPlasticityType & PlasticityType )

Gets Constraint Linear Plasticity properties.

Parameters
AccessorConstraint accessor to query

◆ GetLinearPositionDrive()

void GetLinearPositionDrive ( FConstraintInstanceAccessor & Accessor,
bool & bOutEnableDriveX,
bool & bOutEnableDriveY,
bool & bOutEnableDriveZ )

Gets whether linear position drive is enabled or not.

Parameters
AccessorConstraint accessor to query
bOutEnableDriveXIndicates whether the drive for the X-Axis is enabled
bOutEnableDriveYIndicates whether the drive for the Y-Axis is enabled
bOutEnableDriveZIndicates whether the drive for the Z-Axis is enabled

◆ GetLinearPositionTarget()

void GetLinearPositionTarget ( FConstraintInstanceAccessor & Accessor,
FVector & OutPosTarget )

Gets the target position for the linear drive.

Parameters
AccessorConstraint accessor to query
OutPosTargetTarget position

◆ GetLinearSoftLimitParams()

void GetLinearSoftLimitParams ( FConstraintInstanceAccessor & Accessor,
bool & bSoftLinearLimit,
float32 & LinearLimitStiffness,
float32 & LinearLimitDamping,
float32 & LinearLimitRestitution,
float32 & LinearLimitContactDistance )

Gets Constraint Linear Soft Limit parameters.

Parameters
AccessorConstraint accessor to query *
bSoftLinearLimitTrue is the Linear limit is soft
LinearLimitStiffnessStiffness of the soft Linear limit. Only used when Soft limit is on ( positive value )
LinearLimitDampingDamping of the soft Linear limit. Only used when Soft limit is on ( positive value )
LinearLimitRestitutionControls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.
LinearLimitContactDistanceDetermines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

◆ GetLinearVelocityDrive()

void GetLinearVelocityDrive ( FConstraintInstanceAccessor & Accessor,
bool & bOutEnableDriveX,
bool & bOutEnableDriveY,
bool & bOutEnableDriveZ )

Gets whether linear velocity drive is enabled or not.

Parameters
AccessorConstraint accessor to query
bOutEnableDriveXIndicates whether the drive for the X-Axis is enabled
bOutEnableDriveYIndicates whether the drive for the Y-Axis is enabled
bOutEnableDriveZIndicates whether the drive for the Z-Axis is enabled

◆ GetLinearVelocityTarget()

void GetLinearVelocityTarget ( FConstraintInstanceAccessor & Accessor,
FVector & OutVelTarget )

Gets the target velocity for the linear drive.

Parameters
AccessorConstraint accessor to query
OutVelTargetTarget velocity

◆ GetMassConditioningEnabled()

bool GetMassConditioningEnabled ( FConstraintInstanceAccessor & Accessor)

@brief Gets whether mass conditioning is enabled for the constraint.

◆ GetOrientationDriveSLERP()

void GetOrientationDriveSLERP ( FConstraintInstanceAccessor & Accessor,
bool & bOutEnableSLERP )

Gets whether the angular orientation slerp drive is enabled or not. Only relevant if the AngularDriveMode is set to SLERP.

Parameters
AccessorConstraint accessor to query
bOutEnableSLERPIndicates whether the SLERP drive should be enabled. Only relevant if the AngularDriveMode is set to SLERP

◆ GetOrientationDriveTwistAndSwing()

void GetOrientationDriveTwistAndSwing ( FConstraintInstanceAccessor & Accessor,
bool & bOutEnableTwistDrive,
bool & bOutEnableSwingDrive )

Gets whether angular orientation drive are enabled. Only relevant if the AngularDriveMode is set to Twist and Swing.

Parameters
AccessorConstraint accessor to query
bOutEnableTwistDriveIndicates whether the drive for the twist axis is enabled. Only relevant if the AngularDriveMode is set to Twist and Swing
bOutEnableSwingDriveIndicates whether the drive for the swing axis is enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

◆ GetParentDominates()

bool GetParentDominates ( FConstraintInstanceAccessor & Accessor)

Gets whether the parent body is not affected by it's child motion.

Parameters
AccessorConstraint accessor to query

◆ GetProjectionParams()

void GetProjectionParams ( FConstraintInstanceAccessor & Accessor,
bool & bEnableProjection,
float32 & ProjectionLinearAlpha,
float32 & ProjectionAngularAlpha )

Gets projection parameters of the constraint.

Parameters
AccessorConstraint accessor to query
bEnableProjectiontrue to enable projection
ProjectionLinearAlphahow much linear projection to apply in [0,1] range
ProjectionAngularAlphahow much angular projection to apply in [0,1] range

◆ SetAngularBreakable()

void SetAngularBreakable ( FConstraintInstanceAccessor & Accessor,
bool bAngularBreakable,
float32 AngularBreakThreshold )

Sets Constraint Angular Breakable properties.

Parameters
AccessorConstraint accessor to change
bAngularBreakableWhether it is possible to break the joint with angular force
AngularBreakThresholdTorque needed to break the joint

◆ SetAngularDriveMode()

void SetAngularDriveMode ( FConstraintInstanceAccessor & Accessor,
EAngularDriveMode DriveMode )

Switches the angular drive mode between SLERP and Twist And Swing.

Parameters
AccessorConstraint accessor to change
DriveModeThe angular drive mode to use. SLERP uses shortest spherical path, but will not work if any angular constraints are locked. Twist and Swing decomposes the path into the different angular degrees of freedom but may experience gimbal lock

◆ SetAngularDriveParams()

void SetAngularDriveParams ( FConstraintInstanceAccessor & Accessor,
float32 PositionStrength,
float32 VelocityStrength,
float32 InForceLimit )

Sets the drive params for the angular drive.

Parameters
AccessorConstraint accessor to change
PositionStrengthPositional strength for the drive (stiffness)
VelocityStrengthVelocity strength of the drive (damping)
InForceLimitMax force applied by the drive

◆ SetAngularLimits()

void SetAngularLimits ( FConstraintInstanceAccessor & Accessor,
EAngularConstraintMotion Swing1MotionType,
float32 Swing1LimitAngle,
EAngularConstraintMotion Swing2MotionType,
float32 Swing2LimitAngle,
EAngularConstraintMotion TwistMotionType,
float32 TwistLimitAngle )

Sets COnstraint Angular Motion Ranges.

Parameters
AccessorConstraint accessor to change
Swing1MotionTypeType of swing motion ( first axis )
Swing1LimitAngleSize of limit in degrees in [0, 180] range
Swing2MotionTypeType of swing motion ( second axis )
Swing2LimitAngleSize of limit in degrees in [0, 180] range
TwistMotionTypeType of twist motion
TwistLimitAngleSize of limit in degrees in [0, 180] range

◆ SetAngularOrientationTarget()

void SetAngularOrientationTarget ( FConstraintInstanceAccessor & Accessor,
FRotator InPosTarget )

Sets the target orientation for the angular drive.

Parameters
AccessorConstraint accessor to change
InPosTargetTarget orientation

◆ SetAngularPlasticity()

void SetAngularPlasticity ( FConstraintInstanceAccessor & Accessor,
bool bAngularPlasticity,
float32 AngularPlasticityThreshold )

Sets Constraint Angular Plasticity properties.

Parameters
AccessorConstraint accessor to change
bAngularPlasticityWhether it is possible to reset the target angle from the angular displacement
AngularPlasticityThresholdDegrees needed to reset the rest state of the joint

◆ SetAngularSoftSwingLimitParams()

void SetAngularSoftSwingLimitParams ( FConstraintInstanceAccessor & Accessor,
bool bSoftSwingLimit,
float32 SwingLimitStiffness,
float32 SwingLimitDamping,
float32 SwingLimitRestitution,
float32 SwingLimitContactDistance )

Sets Constraint Angular Soft Swing Limit parameters.

Parameters
AccessorConstraint accessor to change *
bSoftSwingLimitTrue is the swing limit is soft
SwingLimitStiffnessStiffness of the soft swing limit. Only used when Soft limit is on ( positive value )
SwingLimitDampingDamping of the soft swing limit. Only used when Soft limit is on ( positive value )
SwingLimitRestitutionControls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.
SwingLimitContactDistanceDetermines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

◆ SetAngularSoftTwistLimitParams()

void SetAngularSoftTwistLimitParams ( FConstraintInstanceAccessor & Accessor,
bool bSoftTwistLimit,
float32 TwistLimitStiffness,
float32 TwistLimitDamping,
float32 TwistLimitRestitution,
float32 TwistLimitContactDistance )

Sets Constraint Angular Soft Twist Limit parameters.

Parameters
AccessorConstraint accessor to change *
bSoftTwistLimitTrue is the twist limit is soft
TwistLimitStiffnessStiffness of the soft Twist limit. Only used when Soft limit is on ( positive value )
TwistLimitDampingDamping of the soft Twist limit. Only used when Soft limit is on ( positive value )
TwistLimitRestitutionControls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.
TwistLimitContactDistanceDetermines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

◆ SetAngularVelocityDriveSLERP()

void SetAngularVelocityDriveSLERP ( FConstraintInstanceAccessor & Accessor,
bool bEnableSLERP )

Enables/Disables the angular velocity slerp drive. Only relevant if the AngularDriveMode is set to SLERP.

Parameters
AccessorConstraint accessor to change
bEnableSLERPIndicates whether the SLERP drive should be enabled. Only relevant if the AngularDriveMode is set to SLERP

◆ SetAngularVelocityDriveTwistAndSwing()

void SetAngularVelocityDriveTwistAndSwing ( FConstraintInstanceAccessor & Accessor,
bool bEnableTwistDrive,
bool bEnableSwingDrive )

Enables/Disables angular velocity twist and swing drive. Only relevant if the AngularDriveMode is set to Twist and Swing.

Parameters
AccessorConstraint accessor to change
bEnableTwistDriveIndicates whether the drive for the twist axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing
bEnableSwingDriveIndicates whether the drive for the swing axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

◆ SetAngularVelocityTarget()

void SetAngularVelocityTarget ( FConstraintInstanceAccessor & Accessor,
FVector InVelTarget )

Sets the target velocity for the angular drive.

Parameters
AccessorConstraint accessor to change
InVelTargetTarget velocity

◆ SetContactTransferScale()

void SetContactTransferScale ( FConstraintInstanceAccessor & Accessor,
float32 ContactTransferScale )

Set Contact Transfer Scale.

Parameters
AccessorConstraint accessor to change
ContactTransferScaleSet Contact Transfer Scale onto joints parent

◆ SetDisableCollision()

void SetDisableCollision ( FConstraintInstanceAccessor & Accessor,
bool bDisableCollision )

Sets whether bodies attched to the constraint can collide or not.

Parameters
AccessorConstraint accessor to change
bDisableCollisiontrue to disable collision between constrained bodies

◆ SetLinearBreakable()

void SetLinearBreakable ( FConstraintInstanceAccessor & Accessor,
bool bLinearBreakable,
float32 LinearBreakThreshold )

Sets the Linear Breakable properties.

Parameters
AccessorConstraint accessor to change
bLinearBreakableWhether it is possible to break the joint with linear force
LinearBreakThresholdForce needed to break the joint

◆ SetLinearDriveParams()

void SetLinearDriveParams ( FConstraintInstanceAccessor & Accessor,
float32 PositionStrength,
float32 VelocityStrength,
float32 InForceLimit )

Sets the drive params for the linear drive.

Parameters
AccessorConstraint accessor to change
PositionStrengthPositional strength for the drive (stiffness)
VelocityStrengthVelocity strength of the drive (damping)
InForceLimitMax force applied by the drive

◆ SetLinearLimits()

void SetLinearLimits ( FConstraintInstanceAccessor & Accessor,
ELinearConstraintMotion XMotion,
ELinearConstraintMotion YMotion,
ELinearConstraintMotion ZMotion,
float32 Limit )

Sets Constraint Linear Motion Ranges.

Parameters
AccessorConstraint accessor to change
XMotionType of motion along the X axis
YMotionType of motion along the Y axis
ZMotionType of motion along the Z axis
Limitlinear limit to apply to all axis

◆ SetLinearPlasticity()

void SetLinearPlasticity ( FConstraintInstanceAccessor & Accessor,
bool bLinearPlasticity,
float32 LinearPlasticityThreshold,
EConstraintPlasticityType PlasticityType )

Sets Constraint Linear Plasticity properties.

Parameters
AccessorConstraint accessor to change
bLinearPlasticityWhether it is possible to reset the target position from the linear displacement
LinearPlasticityThresholdDelta from target needed to reset the target joint

◆ SetLinearPositionDrive()

void SetLinearPositionDrive ( FConstraintInstanceAccessor & Accessor,
bool bEnableDriveX,
bool bEnableDriveY,
bool bEnableDriveZ )

Enables/Disables linear position drive.

Parameters
AccessorConstraint accessor to change
bEnableDriveXIndicates whether the drive for the X-Axis should be enabled
bEnableDriveYIndicates whether the drive for the Y-Axis should be enabled
bEnableDriveZIndicates whether the drive for the Z-Axis should be enabled

◆ SetLinearPositionTarget()

void SetLinearPositionTarget ( FConstraintInstanceAccessor & Accessor,
FVector InPosTarget )

Sets the target position for the linear drive.

Parameters
AccessorConstraint accessor to change
InPosTargetTarget position

◆ SetLinearSoftLimitParams()

void SetLinearSoftLimitParams ( FConstraintInstanceAccessor & Accessor,
bool bSoftLinearLimit,
float32 LinearLimitStiffness,
float32 LinearLimitDamping,
float32 LinearLimitRestitution,
float32 LinearLimitContactDistance )

Sets Constraint Linear Soft Limit parameters.

Parameters
AccessorConstraint accessor to change *
bSoftLinearLimitTrue is the linear limit is soft
LinearLimitStiffnessStiffness of the soft linear limit. Only used when Soft limit is on ( positive value )
LinearLimitDampingDamping of the soft linear limit. Only used when Soft limit is on ( positive value )
LinearLimitRestitutionControls the amount of bounce when the constraint is violated. A restitution value of 1 will bounce back with the same velocity the limit was hit. A value of 0 will stop dead.
LinearLimitContactDistanceDetermines how close to the limit we have to get before turning the joint on. Larger value will be more expensive, but will do a better job not violating constraints. A smaller value will be more efficient, but easier to violate.

◆ SetLinearVelocityDrive()

void SetLinearVelocityDrive ( FConstraintInstanceAccessor & Accessor,
bool bEnableDriveX,
bool bEnableDriveY,
bool bEnableDriveZ )

Enables/Disables linear velocity drive.

Parameters
AccessorConstraint accessor to change
bEnableDriveXIndicates whether the drive for the X-Axis should be enabled
bEnableDriveYIndicates whether the drive for the Y-Axis should be enabled
bEnableDriveZIndicates whether the drive for the Z-Axis should be enabled

◆ SetLinearVelocityTarget()

void SetLinearVelocityTarget ( FConstraintInstanceAccessor & Accessor,
FVector InVelTarget )

Sets the target velocity for the linear drive.

Parameters
AccessorConstraint accessor to change
InVelTargetTarget velocity

◆ SetMassConditioningEnabled()

void SetMassConditioningEnabled ( FConstraintInstanceAccessor & Accessor,
bool bEnableMassConditioning )

@brief Enable or disable mass conditioning for the constraint.

◆ SetOrientationDriveSLERP()

void SetOrientationDriveSLERP ( FConstraintInstanceAccessor & Accessor,
bool bEnableSLERP )

Enables/Disables the angular orientation slerp drive. Only relevant if the AngularDriveMode is set to SLERP.

Parameters
AccessorConstraint accessor to change
bEnableSLERPIndicates whether the SLERP drive should be enabled. Only relevant if the AngularDriveMode is set to SLERP

◆ SetOrientationDriveTwistAndSwing()

void SetOrientationDriveTwistAndSwing ( FConstraintInstanceAccessor & Accessor,
bool bEnableTwistDrive,
bool bEnableSwingDrive )

Enables/Disables angular orientation drive. Only relevant if the AngularDriveMode is set to Twist and Swing.

Parameters
AccessorConstraint accessor to change
bEnableTwistDriveIndicates whether the drive for the twist axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing
bEnableSwingDriveIndicates whether the drive for the swing axis should be enabled. Only relevant if the AngularDriveMode is set to Twist and Swing

◆ SetParentDominates()

void SetParentDominates ( FConstraintInstanceAccessor & Accessor,
bool bParentDominates )

Sets whether the parent body is not affected by it's child motion.

Parameters
AccessorConstraint accessor to change
bParentDominatestrue to avoid the parent being affected by its child motion

◆ SetProjectionParams()

void SetProjectionParams ( FConstraintInstanceAccessor & Accessor,
bool bEnableProjection,
float32 ProjectionLinearAlpha,
float32 ProjectionAngularAlpha )

Sets projection parameters of the constraint.

Parameters
AccessorConstraint accessor to change
bEnableProjectiontrue to enable projection
ProjectionLinearAlphahow much linear projection to apply in [0,1] range
ProjectionAngularAlphahow much angular projection to apply in [0,1] range