UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::FCharacterGroundConstraint Class Reference

#include <CharacterGroundConstraint.h>

+ Inheritance diagram for Chaos::FCharacterGroundConstraint:

Public Types

using Base = FConstraintBase
 
- Public Types inherited from Chaos::FConstraintBase
typedef TVector< TGeometryParticleHandle< FReal, 3 > *, 2 > FParticleHandlePair
 

Public Member Functions

CHAOS_API FCharacterGroundConstraint ()
 
virtual ~FCharacterGroundConstraint () override
 
CHAOS_API void Init (FSingleParticlePhysicsProxy *InCharacterProxy)
 
FSingleParticlePhysicsProxyGetCharacterParticleProxy () const
 
FSingleParticlePhysicsProxyGetGroundParticleProxy () const
 
void SetGroundParticleProxy (FSingleParticlePhysicsProxy *InGroundProxy)
 
void SetGroundNormal (const FVec3 &Normal)
 
FVec3 GetGroundNormal () const
 
void SetVerticalAxis (const FVec3 &Axis)
 
FVec3 GetVerticalAxis () const
 
void SetGroundDistance (const FReal &Value)
 
FReal GetGroundDistance () const
 
void SetTargetHeight (const FReal &Value)
 
FReal GetTargetHeight () const
 
void SetDampingFactor (const FReal &Value)
 
FReal GetDampingFactor () const
 
void SetMotionTargetMassBias (const FReal &Value)
 
FReal GetMotionTargetMassBias () const
 
void SetRadialForceMotionTargetScaling (const FReal &Value)
 
FReal GetRadialForceMotionTargetScaling () const
 
void SetAssumedOnGroundHeight (const FReal &Value)
 
FReal GetAssumedOnGroundHeight () const
 
void SetMaxWalkableSlopeAngle (const FReal &Value)
 
FReal GetMaxWalkableSlopeAngle () const
 
void SetCosMaxWalkableSlopeAngle (const FReal &Value)
 
FReal GetCosMaxWalkableSlopeAngle () const
 
void SetTargetDeltaPosition (const FVec3 &Value)
 
FVec3 GetTargetDeltaPosition () const
 
void SetTargetDeltaFacing (const FReal &Value)
 
FReal GetTargetDeltaFacing () const
 
void SetMotionTarget (const FVector &TargetDeltaPosition, const FReal &TargetDeltaFacing)
 
void SetRadialForceLimit (const FReal &Value)
 
FReal GetRadialForceLimit () const
 
void SetFrictionForceLimit (const FReal &Value)
 
FReal GetFrictionForceLimit () const
 
void SetTwistTorqueLimit (const FReal &Value)
 
FReal GetTwistTorqueLimit () const
 
void SetSwingTorqueLimit (const FReal &Value)
 
FReal GetSwingTorqueLimit () const
 
void SetUserData (void *Value)
 
voidGetUserData () const
 
void SetMaxCharacterGroundMassRatio (const FReal &Value)
 
FReal GetMaxCharacterGroundMassRatio () const
 
FVector GetSolverAppliedForce () const
 
FVector GetSolverAppliedTorque () const
 
- Public Member Functions inherited from Chaos::FConstraintBase
virtual ~FConstraintBase ()
 
CHAOS_API FConstraintBase (EConstraintType InType)
 
EConstraintType GetType () const
 
bool IsType (EConstraintType InType)
 
CHAOS_API bool IsValid () const
 
bool IsDirty () const
 
bool IsDirty (const EChaosPropertyFlags CheckBits) const
 
void ClearDirtyFlags ()
 
const FDirtyChaosPropertyFlagsGetDirtyFlags () const
 
template<typename T = IPhysicsProxyBase>
T * GetProxy ()
 
CHAOS_API void SetProxy (IPhysicsProxyBase *InProxy)
 
void SyncRemoteData (FDirtyPropertiesManager &Manager, int32 DataIdx, FDirtyChaosProperties &RemoteData)
 

Friends

class FCharacterGroundConstraintProxy
 

Additional Inherited Members

- Protected Attributes inherited from Chaos::FConstraintBase
EConstraintType Type
 
class IPhysicsProxyBaseProxy
 
FDirtyChaosPropertyFlags DirtyFlags
 

Detailed Description

Game thread side representation of a character ground constraint Modified data from this class will be pushed automatically to the physics thread and available through the FCharacterGroundConstraintHandle class. The FCharacterGroundConstraintProxy class, accessible via GetProxy(), knows about both representations and marshalls the data between them

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ FCharacterGroundConstraint()

Chaos::FCharacterGroundConstraint::FCharacterGroundConstraint ( )

◆ ~FCharacterGroundConstraint()

virtual Chaos::FCharacterGroundConstraint::~FCharacterGroundConstraint ( )
inlineoverridevirtual

Member Function Documentation

◆ GetAssumedOnGroundHeight()

FReal Chaos::FCharacterGroundConstraint::GetAssumedOnGroundHeight ( ) const
inline

◆ GetCharacterParticleProxy()

FSingleParticlePhysicsProxy * Chaos::FCharacterGroundConstraint::GetCharacterParticleProxy ( ) const
inline

◆ GetCosMaxWalkableSlopeAngle()

FReal Chaos::FCharacterGroundConstraint::GetCosMaxWalkableSlopeAngle ( ) const
inline

◆ GetDampingFactor()

FReal Chaos::FCharacterGroundConstraint::GetDampingFactor ( ) const
inline

◆ GetFrictionForceLimit()

FReal Chaos::FCharacterGroundConstraint::GetFrictionForceLimit ( ) const
inline

◆ GetGroundDistance()

FReal Chaos::FCharacterGroundConstraint::GetGroundDistance ( ) const
inline

◆ GetGroundNormal()

FVec3 Chaos::FCharacterGroundConstraint::GetGroundNormal ( ) const
inline

◆ GetGroundParticleProxy()

FSingleParticlePhysicsProxy * Chaos::FCharacterGroundConstraint::GetGroundParticleProxy ( ) const
inline

◆ GetMaxCharacterGroundMassRatio()

FReal Chaos::FCharacterGroundConstraint::GetMaxCharacterGroundMassRatio ( ) const
inline

◆ GetMaxWalkableSlopeAngle()

FReal Chaos::FCharacterGroundConstraint::GetMaxWalkableSlopeAngle ( ) const
inline

◆ GetMotionTargetMassBias()

FReal Chaos::FCharacterGroundConstraint::GetMotionTargetMassBias ( ) const
inline

◆ GetRadialForceLimit()

FReal Chaos::FCharacterGroundConstraint::GetRadialForceLimit ( ) const
inline

◆ GetRadialForceMotionTargetScaling()

FReal Chaos::FCharacterGroundConstraint::GetRadialForceMotionTargetScaling ( ) const
inline

◆ GetSolverAppliedForce()

FVector Chaos::FCharacterGroundConstraint::GetSolverAppliedForce ( ) const
inline

◆ GetSolverAppliedTorque()

FVector Chaos::FCharacterGroundConstraint::GetSolverAppliedTorque ( ) const
inline

◆ GetSwingTorqueLimit()

FReal Chaos::FCharacterGroundConstraint::GetSwingTorqueLimit ( ) const
inline

◆ GetTargetDeltaFacing()

FReal Chaos::FCharacterGroundConstraint::GetTargetDeltaFacing ( ) const
inline

◆ GetTargetDeltaPosition()

FVec3 Chaos::FCharacterGroundConstraint::GetTargetDeltaPosition ( ) const
inline

◆ GetTargetHeight()

FReal Chaos::FCharacterGroundConstraint::GetTargetHeight ( ) const
inline

◆ GetTwistTorqueLimit()

FReal Chaos::FCharacterGroundConstraint::GetTwistTorqueLimit ( ) const
inline

◆ GetUserData()

void * Chaos::FCharacterGroundConstraint::GetUserData ( ) const
inline

◆ GetVerticalAxis()

FVec3 Chaos::FCharacterGroundConstraint::GetVerticalAxis ( ) const
inline

◆ Init()

void Chaos::FCharacterGroundConstraint::Init ( FSingleParticlePhysicsProxy InCharacterProxy)

◆ SetAssumedOnGroundHeight()

void Chaos::FCharacterGroundConstraint::SetAssumedOnGroundHeight ( const FReal Value)
inline

This is the height below which the character is assumed to be on the ground and can apply force to move. This is useful if the character is slightly off the ground but should still be considered in a locomotion rather than falling state. If this number is set to zero then the constraint can only apply force to move to the motion target if the solver determines that there is a ground reaction force Input should be positive

◆ SetCosMaxWalkableSlopeAngle()

void Chaos::FCharacterGroundConstraint::SetCosMaxWalkableSlopeAngle ( const FReal Value)
inline

◆ SetDampingFactor()

void Chaos::FCharacterGroundConstraint::SetDampingFactor ( const FReal Value)
inline

The damping factor is used to add softness to the vertical constraint between the character and the ground. This can add springiness to landings and slow the rate of step ups. Input should be positive. A value of 0 gives rigid behavior. A value of 1/Dt or above will give maximum softness Units are /T

◆ SetFrictionForceLimit()

void Chaos::FCharacterGroundConstraint::SetFrictionForceLimit ( const FReal Value)
inline

The maximum force that the character can apply in the plane defined by the ground normal to hold the character in place while standing on an unwalkable incline (defined by max walkable slope angle)

◆ SetGroundDistance()

void Chaos::FCharacterGroundConstraint::SetGroundDistance ( const FReal Value)
inline

Vertical distance from the character body to the ground This should be set every frame as the character moves over the ground and is typically measured by performing one or more physics traces Input should be positive

◆ SetGroundNormal()

void Chaos::FCharacterGroundConstraint::SetGroundNormal ( const FVec3 Normal)
inline

Unit normal to the ground plane Input vector is normalized if it is not already a unit vector

◆ SetGroundParticleProxy()

void Chaos::FCharacterGroundConstraint::SetGroundParticleProxy ( FSingleParticlePhysicsProxy InGroundProxy)
inline

◆ SetMaxCharacterGroundMassRatio()

void Chaos::FCharacterGroundConstraint::SetMaxCharacterGroundMassRatio ( const FReal Value)
inline

Maximum ratio between the character mass and the ground body mass as used by the constraint solver E.g. a value of 2 means that the character can be at most twice as heavy as the ground body and if it is over that the constraint solve will inflate the mass of the ground body to reach a 2:1 ratio This is useful for stability when walking on a light mass. A negative value disables this mass conditioning feature.

◆ SetMaxWalkableSlopeAngle()

void Chaos::FCharacterGroundConstraint::SetMaxWalkableSlopeAngle ( const FReal Value)
inline

The maximum angle of slope that is considered walkable. The slope angle is defined as the angle between the ground normal and vertical axis. If the slope angle is greater than the maximum walkable slope angle the motion target vector is adjusted to stop movement up the slope

◆ SetMotionTarget()

void Chaos::FCharacterGroundConstraint::SetMotionTarget ( const FVector TargetDeltaPosition,
const FReal TargetDeltaFacing 
)
inline

Set both the target delta position and facing angle. This is more efficient than setting them both individually

◆ SetMotionTargetMassBias()

void Chaos::FCharacterGroundConstraint::SetMotionTargetMassBias ( const FReal Value)
inline

This is a fractional value used to scale the ground mass in the motion target constraint. It controls how much tangential force is applied to the ground when the character is moving. 1 means the full reaction force is applied 0 means zero reaction force is applied

◆ SetRadialForceLimit()

void Chaos::FCharacterGroundConstraint::SetRadialForceLimit ( const FReal Value)
inline

The maximum force that the character can apply in the plane defined by the ground normal to move the character to its target position (or hold the character in place if no target delta position is set).

◆ SetRadialForceMotionTargetScaling()

void Chaos::FCharacterGroundConstraint::SetRadialForceMotionTargetScaling ( const FReal Value)
inline

This is a fractional value used to scale the radial force so that the character can achieve the motion target 1 means full scaling is applied and the character will always be able to achieve the motion target 0 means no scaling is applied to the radial force limit

◆ SetSwingTorqueLimit()

void Chaos::FCharacterGroundConstraint::SetSwingTorqueLimit ( const FReal Value)
inline

The maximum torque that the character can apply about the non vertical axes to keep the character upright

◆ SetTargetDeltaFacing()

void Chaos::FCharacterGroundConstraint::SetTargetDeltaFacing ( const FReal Value)
inline

Set the target orientation change about the vertical axis. This is used to turn the character when it is on the ground. The solver will do this by applying a torque if the character is considered to be on the ground and the torque required is less than or equal to the torque limit. For orientation change off the ground, e.g. in air steering, set an angular velocity or impulse on the character body directly. This should be set every frame for a locomoting character, and the value is typically controlled either from a character movement model or from root motion extracted from an animation sequence.

◆ SetTargetDeltaPosition()

void Chaos::FCharacterGroundConstraint::SetTargetDeltaPosition ( const FVec3 Value)
inline

Set the target change in position for the character. This is used to move the character along the ground, and this target will be clamped to the ground plane. The solver will apply a force to move the character to the desired position as long as the character is considered to be on the ground and the force required is less than or equal to the radial force limit. For motion off of the ground, e.g. jumping, set a velocity or impulse on the character body directly. This should be set every frame for a locomoting character, and the value is typically controlled either from a character movement model or from root motion extracted from an animation sequence.

◆ SetTargetHeight()

void Chaos::FCharacterGroundConstraint::SetTargetHeight ( const FReal Value)
inline

Target vertical distance from the character body to the ground If the ground distance is smaller than this number the constraint will try to fix up the error to keep the character at the target height Input should be positive

◆ SetTwistTorqueLimit()

void Chaos::FCharacterGroundConstraint::SetTwistTorqueLimit ( const FReal Value)
inline

The maximum torque that the character can apply about the vertical axis to rotate the character to its target facing direction (or hold the character in place if no target delta facing is set).

◆ SetUserData()

void Chaos::FCharacterGroundConstraint::SetUserData ( void Value)
inline

◆ SetVerticalAxis()

void Chaos::FCharacterGroundConstraint::SetVerticalAxis ( const FVec3 Axis)
inline

Unit vector defining the character up direction Input vector is normalized if it is not already a unit vector

Friends And Related Symbol Documentation

◆ FCharacterGroundConstraintProxy


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