Skip to content

UMjBody

Attribute Value
Kind Class
UE Macro UCLASS
Inherits UMjComponent
Blueprint Spawnable ✅ Yes

Properties

Public Properties

Property Type Description
Pos FVector
Quat FQuat
childclass FString
mocap bool
gravcomp float
bIsQuickConverted bool If true, this body was created via Quick Convert, enabling specific logic like pivot correction.
SleepPolicy EMjBodySleepPolicy Per-body sleep policy (MuJoCo 3.4+). Default lets the global option decide.

Pos

Override-enabled (bOverride_Pos)

  • Type: FVector
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|MjBody|Spatial Pose

Quat

Override-enabled (bOverride_Quat)

  • Type: FQuat
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|MjBody|Orientation

childclass

Override-enabled (bOverride_childclass)

  • Type: FString
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|MjBody

mocap

Override-enabled (bOverride_mocap)

  • Type: bool
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|MjBody

gravcomp

Override-enabled (bOverride_gravcomp)

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|MjBody

bIsQuickConverted

If true, this body was created via Quick Convert, enabling specific logic like pivot correction.

  • Type: bool
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Body

SleepPolicy

Per-body sleep policy (MuJoCo 3.4+). Default lets the global option decide.

  • Type: EMjBodySleepPolicy
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Body|sleep

Private Properties

Property Type Description
m_Geoms TArray<UMjGeom*> Cached list of child Geoms for runtime binding.
m_Joints TArray<UMjJoint*> Cached list of child Joints for runtime binding.

m_Geoms

Cached list of child Geoms for runtime binding.

m_Joints

Cached list of child Joints for runtime binding.

Functions

Public Functions

General

Function Returns Description
RegisterToSpec() void Registers this body to the MuJoCo spec.
ExportTo() void Writes this body's codegen-owned UPROPERTYs to an existing mjsBody.
TickComponent() void Called every frame.
ImportFromXml() void Imports properties with orientation handling respecting compiler settings.
GetMj() BodyView& Semantic accessor for raw MuJoCo data and helper methods.
RegisterToSpec

Registers this body to the MuJoCo spec.

ExportTo

Writes this body's codegen-owned UPROPERTYs to an existing mjsBody.

  • Signature: ExportTo(mjsBody* Element, mjsDefault* Default)
TickComponent

Called every frame.

  • Signature: TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
ImportFromXml

Imports properties with orientation handling respecting compiler settings.

  • Signature: ImportFromXml(const class FXmlNode* Node, const struct FMjCompilerSettings& CompilerSettings)
GetMj

Semantic accessor for raw MuJoCo data and helper methods.

MuJoCo|Body|sleep

Function Returns Description
IsAwake() bool Returns true if this body is currently awake (not sleeping).
Wake() void Wakes this body and its kinematic tree, forcing it out of sleep.
PutToSleep() void Forces this body and its kinematic tree to sleep immediately.
IsAwake

Returns true if this body is currently awake (not sleeping).

  • Signature: IsAwake()
  • Blueprint: 🔵 Callable 💎 Pure
  • Returns: bool
Wake

Wakes this body and its kinematic tree, forcing it out of sleep.

  • Signature: Wake()
  • Blueprint: 🔵 Callable
PutToSleep

Forces this body and its kinematic tree to sleep immediately.

  • Signature: PutToSleep()
  • Blueprint: 🔵 Callable

MuJoCo|Runtime

Function Returns Description
GetWorldPosition() FVector Gets this body's world position in Unreal Engine coordinates (cm).
GetWorldRotation() FQuat Gets this body's world rotation as a quaternion (UE convention).
GetSpatialVelocity() FMuJoCoSpatialVelocity Gets the body's spatial velocity in Unreal coordinates (cm/s and deg/s).
ApplyForce() void Applies an external wrench to this body for the next simulation step.
ClearForce() void Clears any external force/torque applied via ApplyForce on this body.
GetWorldPosition

Gets this body's world position in Unreal Engine coordinates (cm).

  • Signature: GetWorldPosition()
  • Blueprint: 🔵 Callable
  • Returns: FVector
GetWorldRotation

Gets this body's world rotation as a quaternion (UE convention).

  • Signature: GetWorldRotation()
  • Blueprint: 🔵 Callable
  • Returns: FQuat
GetSpatialVelocity

Gets the body's spatial velocity in Unreal coordinates (cm/s and deg/s).

ApplyForce

Applies an external wrench to this body for the next simulation step.

  • Signature: ApplyForce(FVector Force, FVector Torque)
  • Blueprint: 🔵 Callable
ClearForce

Clears any external force/torque applied via ApplyForce on this body.

  • Signature: ClearForce()
  • Blueprint: 🔵 Callable