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

A vehicle component that provides torque output based on a torque control input The output torque is based on a square function style curve, zero at 0.0 and MaxRPM, and 1.0 at mid RPM. More...

#include <MotorModule.h>

+ Inheritance diagram for Chaos::FMotorSimModule:

Public Member Functions

 DEFINE_CHAOSSIMTYPENAME (FMotorSimModule)
 
UE_API FMotorSimModule (const FMotorSettings &Settings)
 
virtual const FString GetDebugName () const
 
virtual UE_API void Simulate (float DeltaTime, const FAllInputs &Inputs, FSimModuleTree &VehicleModuleSystem) override
 
- Public Member Functions inherited from Chaos::FTorqueSimModule
 DEFINE_CHAOSSIMTYPENAME (FTorqueSimModule)
 
 FTorqueSimModule ()
 
virtual bool IsBehaviourType (eSimModuleTypeFlags InType) const
 
void SetDriveTorque (float TorqueIn)
 
float GetDriveTorque () const
 
void SetLoadTorque (float TorqueIn)
 
float GetLoadTorque () const
 
void SetBrakingTorque (float TorqueIn)
 
float GetBrakingTorque () const
 
void SetAngularVelocity (float AngularVelocityIn)
 
float GetAngularVelocity () const
 
void AddAngularVelocity (float AngularVelocityIn)
 
void SetAngularPosition (float AngularPositionIn)
 
float GetAngularPosition () const
 
void SetRPM (float InRPM)
 
float GetRPM () const
 
UE_API void TransmitTorque (const FSimModuleTree &BlockSystem, float PushedTorque, float BrakeTorque=0.f, float GearingRatio=1.0f, float ClutchSlip=1.0f)
 
UE_API void IntegrateAngularVelocity (float DeltaTime, float Inertia, float MaxRotationVel=MAX_FLT)
 
- Public Member Functions inherited from Chaos::ISimulationModuleBase
 DEFINE_CHAOSSIMTYPENAME (ISimulationModuleBase)
 
 ISimulationModuleBase ()
 
virtual ~ISimulationModuleBase ()
 
int GetGuid () const
 
void SetGuid (int GuidIn)
 
virtual bool IsEnabled () const
 
void SetStateFlags (eSimModuleState StateFlagsIn)
 
virtual void OnConstruction_External (const Chaos::FPhysicsObjectHandle &PhysicsObject)
 
virtual void OnTermination_External ()
 
virtual void Simulate (IPhysicsProxyBase *Proxy, Chaos::FPBDRigidParticleHandle *ParticleHandle, float DeltaTime, const FAllInputs &Inputs, FSimModuleTree &VehicleModuleSystem)
 
virtual void OnContactModification (Chaos::FCollisionContactModifier &Modifier, IPhysicsProxyBase *Proxy)
 
virtual void Animate ()
 
void SetAnimationEnabled (bool bInEnabled)
 
bool IsAnimationEnabled ()
 
UE_API void SetAnimationData (const FName &BoneNameIn, const FVector &AnimationOffsetIn, int AnimationSetupIndexIn)
 
const FSimModuleAnimationDataGetAnimationData () const
 
const FVectorGetAnimationOffset () const
 
const FNameGetBoneName () const
 
int GetAnimationSetupIndex ()
 
virtual void DrawDebugInfo ()
 
virtual UE_API bool GetDebugString (FString &StringOut) const
 
void SetTransformIndex (int TransformIndexIn)
 
const int GetTransformIndex () const
 
void SetParticleIndex (FUniqueIdx ParticleIndexIn)
 
const FUniqueIdx GetParticleIndex () const
 
void SetTreeIndex (int TreeIndexIn)
 
int GetTreeIndex () const
 
void SetSimModuleTree (FSimModuleTree *SimModuleTreeIn)
 
UE_API void AddLocalForceAtPosition (const FVector &Force, const FVector &Position, bool bAllowSubstepping=true, bool bIsLocalForce=false, bool bLevelSlope=false, const FColor &DebugColorIn=FColor::Blue)
 
UE_API void AddForceAtCOMPosition (const FVector &Force, const FVector &OffsetFromCOM=FVector::ZeroVector, bool bAllowSubstepping=true, bool bLevelSlope=false, const FColor &DebugColorIn=FColor::Blue)
 
UE_API void AddLocalForce (const FVector &Force, bool bAllowSubstepping=true, bool bIsLocalForce=false, bool bLevelSlope=false, const FColor &DebugColorIn=FColor::Blue)
 
UE_API void AddLocalTorque (const FVector &Torque, bool bAllowSubstepping=true, bool bAccelChangeIn=true, const FColor &DebugColorIn=FColor::Magenta)
 
void SetClustered (bool IsClusteredIn)
 
bool IsClustered () const
 
void SetClusteredTransform (const FTransform &TransformIn)
 
const FTransformGetClusteredTransform () const
 
void SetInitialParticleTransform (const FTransform &TransformIn)
 
const FTransformGetInitialParticleTransform () const
 
void SetComponentTransform (const FTransform &TransformIn)
 
const FTransformGetComponentTransform () const
 
void SetIntactTransform (const FTransform &TransformIn)
 
const FTransformGetIntactTransform () const
 
UE_API const FTransformGetParentRelativeTransform () const
 
void SetLocalLinearVelocity (const FVector &VelocityIn)
 
const FVectorGetLocalLinearVelocity () const
 
void SetLocalAngularVelocity (const FVector &VelocityIn)
 
const FVectorGetLocalAngularVelocity () const
 
UE_API ISimulationModuleBaseGetParent ()
 
UE_API ISimulationModuleBaseGetFirstChild ()
 
UE_API FVehicleBlackboardGetSimBlackboard ()
 
const FVectorGetAppliedForce ()
 
virtual TSharedPtr< FModuleNetDataGenerateNetData (const int32 NodeArrayIndex) const =0
 
virtual FSimOutputDataGenerateOutputData () const
 
UE_API Chaos::FPBDRigidClusteredParticleHandleGetClusterParticle (Chaos::FClusterUnionPhysicsProxy *Proxy)
 
UE_API Chaos::FPBDRigidParticleHandleGetParticleFromUniqueIndex (int32 ParticleUniqueIdx, TArray< Chaos::FPBDRigidParticleHandle * > &Particles)
 
- Public Member Functions inherited from Chaos::FSimulationModuleTypeContainer
void AddType (FName InType)
 
bool IsSimType (FName InType) const
 
FName GetSimType () const
 
template<typename U >
bool IsSimType () const
 
template<typename U >
U * Cast ()
 
template<typename U >
const U * Cast () const
 
- Public Member Functions inherited from Chaos::TSimulationModuleTypeableBase< ISimulationModuleBase >
 TSimulationModuleTypeableBase ()
 
- Public Member Functions inherited from Chaos::TSimModuleSettings< FMotorSettings >
 TSimModuleSettings (const FMotorSettings &SetupIn)
 
FORCEINLINE FMotorSettingsAccessSetup ()
 
FORCEINLINE const FMotorSettingsSetup () const
 

Additional Inherited Members

- Static Public Member Functions inherited from Chaos::FTorqueSimModule
static FTorqueSimModuleCastToTorqueInterface (ISimulationModuleBase *SimModule)
 
- Static Public Member Functions inherited from Chaos::FSimulationModuleTypeContainer
template<typename U >
static FName GetStaticSimType ()
 
- Static Public Member Functions inherited from Chaos::TSimulationModuleTypeableBase< ISimulationModuleBase >
static FName StaticSimTypeBase ()
 
- Public Attributes inherited from Chaos::ISimulationModuleBase
bool IsInitialized = false
 
- Public Attributes inherited from Chaos::FSimulationModuleTypeContainer
TSet< FNameMyTypes
 
FName MostRecentAdd = NAME_None
 
- Static Public Attributes inherited from Chaos::ISimulationModuleBase
static const int INVALID_IDX = -1
 
- Protected Attributes inherited from Chaos::FTorqueSimModule
float DriveTorque
 
float LoadTorque
 
float BrakingTorque
 
float AngularVelocity
 
float AngularPosition
 
- Protected Attributes inherited from Chaos::ISimulationModuleBase
FSimModuleTreeSimModuleTree
 
int SimTreeIndex
 
eSimModuleState StateFlags
 
int TransformIndex
 
FUniqueIdx ParticleIdx
 
FTransform InitialParticleTransform
 
FTransform RelativeOffsetTransform
 
FTransform ComponentTransform
 
FTransform ClusteredCOMRelativeTransform
 
FTransform IntactCOMRelativeTransform
 
FVector LocalLinearVelocity
 
FVector LocalAngularVelocity
 
bool bClustered
 
bool bAnimationEnabled
 
FVector AnimationOffset
 
FSimModuleAnimationData AnimationData
 
FVector AppliedForce
 
int Guid
 
FPBDRigidClusteredParticleHandleCachedParticle
 

Detailed Description

A vehicle component that provides torque output based on a torque control input The output torque is based on a square function style curve, zero at 0.0 and MaxRPM, and 1.0 at mid RPM.

Constructor & Destructor Documentation

◆ FMotorSimModule()

Chaos::FMotorSimModule::FMotorSimModule ( const FMotorSettings Settings)

Member Function Documentation

◆ DEFINE_CHAOSSIMTYPENAME()

Chaos::FMotorSimModule::DEFINE_CHAOSSIMTYPENAME ( FMotorSimModule  )

◆ GetDebugName()

virtual const FString Chaos::FMotorSimModule::GetDebugName ( ) const
inlinevirtual

Get the friendly name for this module, primarily for logging & debugging module tree

Implements Chaos::ISimulationModuleBase.

◆ Simulate()

void Chaos::FMotorSimModule::Simulate ( float  DeltaTime,
const FAllInputs Inputs,
FSimModuleTree VehicleModuleSystem 
)
overridevirtual

The main Simulation function that is called from the physics async callback thread

Reimplemented from Chaos::ISimulationModuleBase.


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