Navigation
API > API/Runtime > API/Runtime/Engine
Angular Drive
| Name | FAngularDriveConstraint |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Classes/PhysicsEngine/ConstraintDrives.h |
| Include Path | #include "PhysicsEngine/ConstraintDrives.h" |
Syntax
USTRUCT ()
struct FAngularDriveConstraint
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAngularDriveConstraint() |
PhysicsEngine/ConstraintDrives.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AngularDriveMode | TEnumAsByte< enum EAngularDriveMode::Type > | Whether motors use SLERP (spherical lerp) or decompose into a Swing motor (cone constraints) and Twist motor (roll constraints). | PhysicsEngine/ConstraintDrives.h |
|
| AngularVelocityTarget | FVector | Target angular velocity relative to the body reference frame in revolutions per second. | PhysicsEngine/ConstraintDrives.h |
|
| bAccelerationMode | bool | Whether to use acceleration mode for angular drive. The other option is force mode. (default:true) | PhysicsEngine/ConstraintDrives.h |
|
| OrientationTarget | FRotator | Target orientation relative to the the body reference frame. | PhysicsEngine/ConstraintDrives.h |
|
| SlerpDrive | FConstraintDrive | Controls the SLERP (spherical lerp) drive between current orientation/velocity and target orientation/velocity. | PhysicsEngine/ConstraintDrives.h |
|
| SwingDrive | FConstraintDrive | Controls the cone constraint drive between current orientation/velocity and target orientation/velocity. | PhysicsEngine/ConstraintDrives.h |
|
| TwistDrive | FConstraintDrive | Controls the twist (roll) constraint drive between current orientation/velocity and target orientation/velocity. | PhysicsEngine/ConstraintDrives.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool GetAccelerationMode() |
PhysicsEngine/ConstraintDrives.h | ||
void GetDriveParams
(
float& OutStiffness, |
Gets just the swing drive parameters - assuming the single-float set function has previously been used. | PhysicsEngine/ConstraintDrives.h | |
void GetDriveParams
(
FVector& OutStiffness, |
Gets drive parameters in the order swing, twist, slerp. | PhysicsEngine/ConstraintDrives.h | |
bool IsOrientationDriveEnabled() |
PhysicsEngine/ConstraintDrives.h | ||
bool IsVelocityDriveEnabled() |
PhysicsEngine/ConstraintDrives.h | ||
void SetAccelerationMode
(
bool bAccelerationMode |
PhysicsEngine/ConstraintDrives.h | ||
void SetAngularDriveMode
(
EAngularDriveMode::Type DriveMode |
PhysicsEngine/ConstraintDrives.h | ||
void SetAngularVelocityDriveSLERP
(
bool InEnableSLERP |
PhysicsEngine/ConstraintDrives.h | ||
void SetAngularVelocityDriveTwistAndSwing
(
bool InEnableTwistDrive, |
PhysicsEngine/ConstraintDrives.h | ||
void SetDriveParams
(
float InStiffness, |
Sets the three drive parameters (swing, twist and slerp) to the same value. | PhysicsEngine/ConstraintDrives.h | |
void SetDriveParams
(
const FVector& InStiffness, |
Sets drive parameters in the order swing, twist, slerp. | PhysicsEngine/ConstraintDrives.h | |
void SetOrientationDriveSLERP
(
bool InEnableSLERP |
PhysicsEngine/ConstraintDrives.h | ||
void SetOrientationDriveTwistAndSwing
(
bool InEnableTwistDrive, |
Updates physx drive with properties from unreal These functions may leave the struct in an invalid state unless calling UpdatePhysX* functions. | PhysicsEngine/ConstraintDrives.h |