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

#include <ConstraintDrives.h>

Public Member Functions

ENGINE_API FAngularDriveConstraint ()
 
bool IsOrientationDriveEnabled () const
 
bool IsVelocityDriveEnabled () const
 
ENGINE_API void SetOrientationDriveTwistAndSwing (bool InEnableTwistDrive, bool InEnableSwingDrive)
 
ENGINE_API void SetOrientationDriveSLERP (bool InEnableSLERP)
 
ENGINE_API void SetAngularVelocityDriveTwistAndSwing (bool InEnableTwistDrive, bool InEnableSwingDrive)
 
ENGINE_API void SetAngularVelocityDriveSLERP (bool InEnableSLERP)
 
ENGINE_API void SetDriveParams (float InStiffness, float InDamping, float InForceLimit)
 
ENGINE_API void SetDriveParams (const FVector &InStiffness, const FVector &InDamping, const FVector &InForceLimit)
 
ENGINE_API void GetDriveParams (float &OutStiffness, float &OutDamping, float &OutForceLimit) const
 
ENGINE_API void GetDriveParams (FVector &OutStiffness, FVector &OutDamping, FVector &OutForceLimit) const
 
ENGINE_API void SetAngularDriveMode (EAngularDriveMode::Type DriveMode)
 
ENGINE_API void SetAccelerationMode (bool bAccelerationMode)
 
ENGINE_API bool GetAccelerationMode () const
 

Public Attributes

FConstraintDrive TwistDrive
 
FConstraintDrive SwingDrive
 
FConstraintDrive SlerpDrive
 
FRotator OrientationTarget
 
FVector AngularVelocityTarget
 
TEnumAsByte< enum EAngularDriveMode::TypeAngularDriveMode
 
bool bAccelerationMode = true
 

Detailed Description

Angular Drive

Constructor & Destructor Documentation

◆ FAngularDriveConstraint()

FAngularDriveConstraint::FAngularDriveConstraint ( )

Member Function Documentation

◆ GetAccelerationMode()

bool FAngularDriveConstraint::GetAccelerationMode ( ) const

◆ GetDriveParams() [1/2]

void FAngularDriveConstraint::GetDriveParams ( float OutStiffness,
float OutDamping,
float OutForceLimit 
) const

◆ GetDriveParams() [2/2]

void FAngularDriveConstraint::GetDriveParams ( FVector OutStiffness,
FVector OutDamping,
FVector OutForceLimit 
) const

◆ IsOrientationDriveEnabled()

bool FAngularDriveConstraint::IsOrientationDriveEnabled ( ) const
inline

◆ IsVelocityDriveEnabled()

bool FAngularDriveConstraint::IsVelocityDriveEnabled ( ) const
inline

◆ SetAccelerationMode()

void FAngularDriveConstraint::SetAccelerationMode ( bool  bAccelerationMode)

◆ SetAngularDriveMode()

void FAngularDriveConstraint::SetAngularDriveMode ( EAngularDriveMode::Type  DriveMode)

◆ SetAngularVelocityDriveSLERP()

void FAngularDriveConstraint::SetAngularVelocityDriveSLERP ( bool  InEnableSLERP)

◆ SetAngularVelocityDriveTwistAndSwing()

void FAngularDriveConstraint::SetAngularVelocityDriveTwistAndSwing ( bool  InEnableTwistDrive,
bool  InEnableSwingDrive 
)

◆ SetDriveParams() [1/2]

void FAngularDriveConstraint::SetDriveParams ( const FVector InStiffness,
const FVector InDamping,
const FVector InForceLimit 
)

◆ SetDriveParams() [2/2]

void FAngularDriveConstraint::SetDriveParams ( float  InStiffness,
float  InDamping,
float  InForceLimit 
)

◆ SetOrientationDriveSLERP()

void FAngularDriveConstraint::SetOrientationDriveSLERP ( bool  InEnableSLERP)

◆ SetOrientationDriveTwistAndSwing()

void FAngularDriveConstraint::SetOrientationDriveTwistAndSwing ( bool  InEnableTwistDrive,
bool  InEnableSwingDrive 
)

Updates physx drive with properties from unreal

Member Data Documentation

◆ AngularDriveMode

TEnumAsByte<enum EAngularDriveMode::Type> FAngularDriveConstraint::AngularDriveMode

Whether motors use SLERP (spherical lerp) or decompose into a Swing motor (cone constraints) and Twist motor (roll constraints). NOTE: SLERP will NOT work if any of the angular constraints are locked.

◆ AngularVelocityTarget

FVector FAngularDriveConstraint::AngularVelocityTarget

Target angular velocity relative to the body reference frame in revolutions per second.

◆ bAccelerationMode

bool FAngularDriveConstraint::bAccelerationMode = true

Whether to use acceleration mode for angular drive. The other option is force mode. (default:true)

◆ OrientationTarget

FRotator FAngularDriveConstraint::OrientationTarget

Target orientation relative to the the body reference frame.

◆ SlerpDrive

FConstraintDrive FAngularDriveConstraint::SlerpDrive

Controls the SLERP (spherical lerp) drive between current orientation/velocity and target orientation/velocity. NOTE: This is only available when all three angular limits are either free or limited. Locking any angular limit will turn off the drive implicitly.

◆ SwingDrive

FConstraintDrive FAngularDriveConstraint::SwingDrive

Controls the cone constraint drive between current orientation/velocity and target orientation/velocity. This is available as long as there is at least one swing limit set to free or limited.

◆ TwistDrive

FConstraintDrive FAngularDriveConstraint::TwistDrive

Controls the twist (roll) constraint drive between current orientation/velocity and target orientation/velocity. This is available as long as the twist limit is set to free or limited.


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