Skip to content

UMjSite

Represents a MuJoCo site element within Unreal Engine.

Sites are interesting locations on a body, used for sensor attachment, constraint definition, or visualization. This component mirrors the site element in MuJoCo XML.

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

Properties

Public Properties

Property Type Description
Type EMjSiteType The geometric shape type of the site.
Size FVector Dimensions of the site geometry. Interpretation depends on Type.
MjClassName FString Optional MuJoCo class name to inherit defaults from.
Rgba FLinearColor RGBA Color of the site visualization.
Group int32 Integer group ID for visibility filtering.
FromToStart FVector Start point for fromto definition.
FromToEnd FVector End point for fromto definition.
m_SiteView SiteView The runtime view of the MuJoCo site. Valid only after Bind() is called.

Type

The geometric shape type of the site.

  • Type: EMjSiteType
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Site

Size

Dimensions of the site geometry. Interpretation depends on Type.

  • Type: FVector
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Site

MjClassName

Optional MuJoCo class name to inherit defaults from.

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

Rgba

RGBA Color of the site visualization.

  • Type: FLinearColor
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Site

Group

Integer group ID for visibility filtering.

  • Type: int32
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Site

FromToStart

Start point for fromto definition.

  • Type: FVector
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Site
  • Notes: Override-enabled (bOverride_FromTo)

FromToEnd

End point for fromto definition.

  • Type: FVector
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Site
  • Notes: Override-enabled (bOverride_FromTo)

m_SiteView

The runtime view of the MuJoCo site. Valid only after Bind() is called.

Functions

Public Functions

General

Function Returns Description
ExportTo() void Exports properties to a MuJoCo spec site structure.
Bind() void Binds this component to the live MuJoCo simulation.
RegisterToSpec() void Registers this site to the MuJoCo spec.
ImportFromXml() void Imports properties from a MuJoCo XML node.
UMjSite() Default constructor.
GetMj() SiteView& Semantic accessor for raw MuJoCo data and helper methods.
ExportTo

Exports properties to a MuJoCo spec site structure.

  • Signature: ExportTo(mjsSite* site, mjsDefault* def)
Bind

Binds this component to the live MuJoCo simulation.

  • Signature: Bind(mjModel* model, mjData* data, const FString& Prefix)
RegisterToSpec

Registers this site to the MuJoCo spec.

ImportFromXml

Imports properties from a MuJoCo XML node.

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

Default constructor.

  • Signature: UMjSite()
GetMj

Semantic accessor for raw MuJoCo data and helper methods.