UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FConstraintProfileProperties Struct Reference

#include <ConstraintInstance.h>

Public Member Functions

ENGINE_API FConstraintProfileProperties ()
 
ENGINE_API void Update_AssumesLocked (const FPhysicsConstraintHandle &InConstraintRef, float AverageMass, float UseScale, bool InInitialize=false) const
 
ENGINE_API void UpdateBreakable_AssumesLocked (const FPhysicsConstraintHandle &InConstraintRef) const
 
ENGINE_API void UpdatePlasticity_AssumesLocked (const FPhysicsConstraintHandle &InConstraintRef) const
 
ENGINE_API void UpdateContactTransferScale_AssumesLocked (const FPhysicsConstraintHandle &InConstraintRef) const
 
ENGINE_API void UpdateConstraintFlags_AssumesLocked (const FPhysicsConstraintHandle &InConstraintRef) const
 

Public Attributes

float ProjectionLinearTolerance
 
float ProjectionAngularTolerance
 
float ProjectionLinearAlpha
 
float ProjectionAngularAlpha
 
float ShockPropagationAlpha
 
float LinearBreakThreshold
 
float LinearPlasticityThreshold
 
float AngularBreakThreshold
 
float AngularPlasticityThreshold
 
float ContactTransferScale
 
FLinearConstraint LinearLimit
 
FConeConstraint ConeLimit
 
FTwistConstraint TwistLimit
 
uint8 bDisableCollision: 1
 
uint8 bParentDominates: 1
 
uint8 bEnableShockPropagation: 1
 
uint8 bEnableProjection: 1
 
uint8 bEnableMassConditioning: 1
 
uint8 bUseLinearJointSolver: 1
 
uint8 bAngularBreakable: 1
 
uint8 bAngularPlasticity: 1
 
uint8 bLinearBreakable: 1
 
uint8 bLinearPlasticity: 1
 
FLinearDriveConstraint LinearDrive
 
FAngularDriveConstraint AngularDrive
 
TEnumAsByte< enum EConstraintPlasticityTypeLinearPlasticityType
 

Detailed Description

Container for properties of a physics constraint that can be easily swapped at runtime. This is useful for switching different setups when going from ragdoll to standup for example

Constructor & Destructor Documentation

◆ FConstraintProfileProperties()

FConstraintProfileProperties::FConstraintProfileProperties ( )

Member Function Documentation

◆ Update_AssumesLocked()

void FConstraintProfileProperties::Update_AssumesLocked ( const FPhysicsConstraintHandle InConstraintRef,
float  AverageMass,
float  UseScale,
bool  InInitialize = false 
) const

Updates physx joint properties from unreal properties (limits, drives, flags, etc...)

◆ UpdateBreakable_AssumesLocked()

void FConstraintProfileProperties::UpdateBreakable_AssumesLocked ( const FPhysicsConstraintHandle InConstraintRef) const

Updates joint breakable properties (threshold, etc...)

◆ UpdateConstraintFlags_AssumesLocked()

void FConstraintProfileProperties::UpdateConstraintFlags_AssumesLocked ( const FPhysicsConstraintHandle InConstraintRef) const

Updates joint flag based on profile properties

◆ UpdateContactTransferScale_AssumesLocked()

void FConstraintProfileProperties::UpdateContactTransferScale_AssumesLocked ( const FPhysicsConstraintHandle InConstraintRef) const

Updates joint linear mass scales.

◆ UpdatePlasticity_AssumesLocked()

void FConstraintProfileProperties::UpdatePlasticity_AssumesLocked ( const FPhysicsConstraintHandle InConstraintRef) const

Updates joint breakable properties (threshold, etc...)

Member Data Documentation

◆ AngularBreakThreshold

float FConstraintProfileProperties::AngularBreakThreshold

Torque needed to break the joint.

◆ AngularDrive

FAngularDriveConstraint FConstraintProfileProperties::AngularDrive

◆ AngularPlasticityThreshold

float FConstraintProfileProperties::AngularPlasticityThreshold

[Chaos Only] Degree threshold from target angle needed to reset the target angle.

◆ bAngularBreakable

uint8 FConstraintProfileProperties::bAngularBreakable

Whether it is possible to break the joint with angular force.

◆ bAngularPlasticity

uint8 FConstraintProfileProperties::bAngularPlasticity

Whether it is possible to reset target rotations from the angular displacement.

◆ bDisableCollision

uint8 FConstraintProfileProperties::bDisableCollision

◆ bEnableMassConditioning

uint8 FConstraintProfileProperties::bEnableMassConditioning

Whether mass conditioning is enabled for this joint. Mass conditioning applies a non-physical scale to the mass and inertia of the two bodies that only affects this joint, so that the mass and inertia ratios are smaller. This helps stabilize joints where the bodies are very different sizes, and especially when the parent body is heavier than the child. However, it can lead to unrealistic behaviour, especially when collisions are involved.

◆ bEnableProjection

uint8 FConstraintProfileProperties::bEnableProjection

Projection is a post-solve position and angular fixup consisting of two correction procedures. First, if the constraint limits are exceeded by more that the Linear or Angular Tolerance, the bodies are teleported to eliminate the error. Second, if the constraint limits are exceeded by less than the tolerance, a semi-physical correction is applied, with the parent body in the constraint is treated as having infinite mass. The teleport tolerance are controlled by ProjectionLinearTolerance and ProjectionAngularTolerance. The semi-physical correction is controlled by ProjectionLinearAlpha and ProjectionAnguilarAlpha. You may have one, none, or both systems enabled at the same time.

Projection only works well if the chain is not interacting with other objects (e.g., through collisions) because the projection of the bodies in the chain will cause other constraints to be violated. Likewise, if a body is influenced by multiple constraints, then enabling projection on more than one constraint may lead to unexpected results - the "last" constraint would win but the order in which constraints are solved cannot be directly controlled.

Note that the semi-physical projection (ProjectionLinearAlpha and ProjectionAngularAlpha) is only applied to hard-limit constraints and not those with soft limits because the soft limit is the point at which the soft-constraint (spring) kicks in, and not really a limit on how far the joint can be separated.

◆ bEnableShockPropagation

uint8 FConstraintProfileProperties::bEnableShockPropagation

Shock propagation increases the mass of the parent body for the last iteration of the position and velocity solve phases. This can help stiffen up joint chains, but is also prone to introducing energy down the chain especially at high alpha. It also does not work well if there are collisions on the bodies preventing the joints from correctly resolving - this can lead to jitter, especially if collision shock propagation is also enabled.

◆ bLinearBreakable

uint8 FConstraintProfileProperties::bLinearBreakable

Whether it is possible to break the joint with linear force.

◆ bLinearPlasticity

uint8 FConstraintProfileProperties::bLinearPlasticity

Whether it is possible to reset spring rest length from the linear deformation.

◆ bParentDominates

uint8 FConstraintProfileProperties::bParentDominates

◆ bUseLinearJointSolver

uint8 FConstraintProfileProperties::bUseLinearJointSolver

World Solver: Whether to use linear solver for this joint. Linear solver is faster and less accurate. The nonlinear solver is slower and more convergent.

◆ ConeLimit

FConeConstraint FConstraintProfileProperties::ConeLimit

◆ ContactTransferScale

float FConstraintProfileProperties::ContactTransferScale

[Chaos Only] Colliison transfer on parent from the joints child. Range is 0.0-MAX

◆ LinearBreakThreshold

float FConstraintProfileProperties::LinearBreakThreshold

Force needed to break the distance constraint.

◆ LinearDrive

FLinearDriveConstraint FConstraintProfileProperties::LinearDrive

◆ LinearLimit

FLinearConstraint FConstraintProfileProperties::LinearLimit

◆ LinearPlasticityThreshold

float FConstraintProfileProperties::LinearPlasticityThreshold

[Chaos Only] Percent threshold from center of mass distance needed to reset the linear drive position target. This value can be greater than 1.

◆ LinearPlasticityType

TEnumAsByte<enum EConstraintPlasticityType> FConstraintProfileProperties::LinearPlasticityType

Whether linear plasticity has a operation mode [free]

◆ ProjectionAngularAlpha

float FConstraintProfileProperties::ProjectionAngularAlpha

How much semi-physical angular projection correction to apply [0-1]. Only used if bEnableProjection is true and if hard limits are used.

◆ ProjectionAngularTolerance

float FConstraintProfileProperties::ProjectionAngularTolerance

If the joint error is above this distance after the solve phase, the child body will be teleported to fix the error. Only used if bEnableProjection is true.

◆ ProjectionLinearAlpha

float FConstraintProfileProperties::ProjectionLinearAlpha

How much semi-physical linear projection correction to apply [0-1]. Only used if bEnableProjection is true and if hard limits are used.

◆ ProjectionLinearTolerance

float FConstraintProfileProperties::ProjectionLinearTolerance

If the joint error is above this distance after the solve phase, the child body will be teleported to fix the error. Only used if bEnableProjection is true.

◆ ShockPropagationAlpha

float FConstraintProfileProperties::ShockPropagationAlpha

How much shock propagation to apply [0-1]. Shock propagation increases the mass of the parent body for the last iteration of the position and velocity solve phases. This can help stiffen up joint chains, but is also prone to introducing energy down the chain especially at high alpha. Only used in bEnableShockPropagation is true.

◆ TwistLimit

FTwistConstraint FConstraintProfileProperties::TwistLimit

The documentation for this struct was generated from the following files: