Skip to content

UMjBody

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

Properties

Public Properties

Property Type Description
bIsQuickConverted bool If true, this body was created via Quick Convert, enabling specific logic like pivot correction.
bDrivenByUnreal bool If true, this body's transform is driven by the Unreal Actor/Component, enabling One-Way coupling (Unreal -> MuJoCo).
Gravcomp float Anti-gravity force applied to the body, in units of body weight.
bOverride_ChildClassName bool If true, overrides the MuJoCo default class name inherited from the parent body's childclass attribute.
ChildClassName FString Child class name for this body.
SleepPolicy EMjBodySleepPolicy Per-body sleep policy (MuJoCo 3.4+). Default lets the global option decide.

bIsQuickConverted

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

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

bDrivenByUnreal

If true, this body's transform is driven by the Unreal Actor/Component, enabling One-Way coupling (Unreal -> MuJoCo).

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

Gravcomp

Anti-gravity force applied to the body, in units of body weight.

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo Physics
  • Notes: Override-enabled (bOverride_Gravcomp)

bOverride_ChildClassName

If true, overrides the MuJoCo default class name inherited from the parent body's childclass attribute.

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

ChildClassName

Child class name for this body.

  • Type: FString
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo Physics
  • Notes: Override-enabled (bOverride_ChildClassName)

SleepPolicy

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

  • Type: EMjBodySleepPolicy
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo Physics|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.
TickComponent() void Called every frame.
ImportFromXml() void Imports properties (Transform) directly from the raw XML node.
GetMj() BodyView& Semantic accessor for raw MuJoCo data and helper methods.
RegisterToSpec

Registers this body to the MuJoCo spec.

TickComponent

Called every frame.

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

Imports properties (Transform) directly from the raw XML node.

  • Signature: ImportFromXml(const class FXmlNode* Node)
GetMj

Semantic accessor for raw MuJoCo data and helper methods.

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

MuJoCo|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.
Sleep() 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
Sleep

Forces this body and its kinematic tree to sleep immediately.

  • Signature: Sleep()
  • Blueprint: 🔵 Callable