![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#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 |
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
| FConstraintProfileProperties::FConstraintProfileProperties | ( | ) |
| 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...)
| void FConstraintProfileProperties::UpdateBreakable_AssumesLocked | ( | const FPhysicsConstraintHandle & | InConstraintRef | ) | const |
Updates joint breakable properties (threshold, etc...)
| void FConstraintProfileProperties::UpdateConstraintFlags_AssumesLocked | ( | const FPhysicsConstraintHandle & | InConstraintRef | ) | const |
Updates joint flag based on profile properties
| void FConstraintProfileProperties::UpdateContactTransferScale_AssumesLocked | ( | const FPhysicsConstraintHandle & | InConstraintRef | ) | const |
Updates joint linear mass scales.
| void FConstraintProfileProperties::UpdatePlasticity_AssumesLocked | ( | const FPhysicsConstraintHandle & | InConstraintRef | ) | const |
Updates joint breakable properties (threshold, etc...)
| float FConstraintProfileProperties::AngularBreakThreshold |
Torque needed to break the joint.
| FAngularDriveConstraint FConstraintProfileProperties::AngularDrive |
| float FConstraintProfileProperties::AngularPlasticityThreshold |
[Chaos Only] Degree threshold from target angle needed to reset the target angle.
| uint8 FConstraintProfileProperties::bAngularBreakable |
Whether it is possible to break the joint with angular force.
| uint8 FConstraintProfileProperties::bAngularPlasticity |
Whether it is possible to reset target rotations from the angular displacement.
| uint8 FConstraintProfileProperties::bDisableCollision |
| 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.
| 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.
| 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.
| uint8 FConstraintProfileProperties::bLinearBreakable |
Whether it is possible to break the joint with linear force.
| uint8 FConstraintProfileProperties::bLinearPlasticity |
Whether it is possible to reset spring rest length from the linear deformation.
| uint8 FConstraintProfileProperties::bParentDominates |
| 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.
| FConeConstraint FConstraintProfileProperties::ConeLimit |
| float FConstraintProfileProperties::ContactTransferScale |
[Chaos Only] Colliison transfer on parent from the joints child. Range is 0.0-MAX
| float FConstraintProfileProperties::LinearBreakThreshold |
Force needed to break the distance constraint.
| FLinearDriveConstraint FConstraintProfileProperties::LinearDrive |
| FLinearConstraint FConstraintProfileProperties::LinearLimit |
| 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.
| TEnumAsByte<enum EConstraintPlasticityType> FConstraintProfileProperties::LinearPlasticityType |
Whether linear plasticity has a operation mode [free]
| 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.
| 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.
| 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.
| 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.
| 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.
| FTwistConstraint FConstraintProfileProperties::TwistLimit |