UMjBox¶
Box primitive geometry.
| Attribute | Value |
|---|---|
| Kind | Class |
| UE Macro | UCLASS |
| Inherits | UMjGeom |
| Blueprint Spawnable | ✅ Yes |
Properties¶
Public Properties¶
| Property | Type | Description |
|---|---|---|
Extents |
FVector |
|
VisualizerMesh |
class UStaticMeshComponent* |
Internal-only visual mesh for the editor. |
Pos |
FVector |
|
Quat |
FQuat |
|
contype |
int32 |
|
conaffinity |
int32 |
|
condim |
int32 |
|
group |
int32 |
|
priority |
int32 |
|
material |
FString |
|
mass |
float |
|
density |
float |
|
solmix |
float |
|
margin |
float |
|
gap |
float |
|
hfield |
FString |
|
mesh |
FString |
|
fitscale |
bool |
|
rgba |
FLinearColor |
|
verride |
o |
|
m_GeomView |
GeomView | The runtime view of the MuJoCo geom. Valid only after Bind() is called. |
Type |
EMjGeomType | |
ShellInertia |
EMjGeomInertia | |
FluidShape |
EMjFluidShape | |
bWasImported |
bool |
True when this component was created via ImportFromXml. Lets export |
MeshName |
FString |
Name of the mesh asset if Type is mesh. |
bComplexMeshRequired |
bool |
Legacy: use complex collision mesh. Hidden — use "Decompose mesh" button instead. |
CoACDThreshold |
float |
CoACD decomposition threshold. Lower = more accurate but more hulls. Range [0.01, 1.0]. |
bIsDecomposedHull |
bool |
True if this geom was created by CoACD decomposition of another geom. |
bDisabledByDecomposition |
bool |
True if this geom's mesh was decomposed into hull sub-geoms. |
MjClassName |
FString |
Optional MuJoCo class name to inherit defaults from (string fallback). |
OverrideMaterial |
TObjectPtr<UMaterialInterface> |
Optional Unreal material override for primitive visualizer meshes (Box/Sphere/Cylinder). |
DefaultClass |
UMjDefault* | Reference to a UMjDefault component for default class inheritance. Set via detail customization dropdown. |
Extents¶
- Type: FVector
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Primitive
Pos¶
Override-enabled (
bOverride_Pos)
- Type: FVector
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom|Spatial Pose
Quat¶
Override-enabled (
bOverride_Quat)
- Type: FQuat
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom|Orientation
contype¶
Override-enabled (
bOverride_contype)
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
conaffinity¶
Override-enabled (
bOverride_conaffinity)
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
condim¶
Override-enabled (
bOverride_condim)
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
group¶
Override-enabled (
bOverride_group)
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
priority¶
Override-enabled (
bOverride_priority)
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
material¶
Override-enabled (
bOverride_material)
- Type: FString
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
mass¶
Override-enabled (
bOverride_mass)
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
density¶
Override-enabled (
bOverride_density)
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
solmix¶
Override-enabled (
bOverride_solmix)
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
margin¶
Override-enabled (
bOverride_margin)
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
gap¶
Override-enabled (
bOverride_gap)
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
hfield¶
Override-enabled (
bOverride_hfield)
- Type: FString
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
mesh¶
Override-enabled (
bOverride_mesh)
- Type: FString
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
fitscale¶
Override-enabled (
bOverride_fitscale)
- Type: bool
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
rgba¶
Override-enabled (
bOverride_rgba)
- Type: FLinearColor
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
verride¶
Override-enabled (
bOverride_fluidcoef)
- Type: o
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|MjGeom
Type¶
Override-enabled (
bOverride_Type)
- Type: EMjGeomType
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
ShellInertia¶
Override-enabled (
bOverride_ShellInertia)
- Type: EMjGeomInertia
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
FluidShape¶
Override-enabled (
bOverride_FluidShape)
- Type: EMjFluidShape
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
MeshName¶
Name of the mesh asset if Type is mesh.
- Type: FString
- Editor: 👁 VisibleAnywhere
- Blueprint: 🟢 ReadOnly
- Category: MuJoCo|Geom
bComplexMeshRequired¶
Legacy: use complex collision mesh. Hidden — use "Decompose mesh" button instead.
- Type: bool
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
CoACDThreshold¶
CoACD decomposition threshold. Lower = more accurate but more hulls. Range [0.01, 1.0].
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
- Notes: Override-enabled (
Type)
bDisabledByDecomposition¶
True if this geom's mesh was decomposed into hull sub-geoms.
- Type: bool
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
MjClassName¶
Optional MuJoCo class name to inherit defaults from (string fallback).
- Type: FString
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
OverrideMaterial¶
Optional Unreal material override for primitive visualizer meshes (Box/Sphere/Cylinder).
- Type: TObjectPtr
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Visual
- Notes: Override-enabled (
Type)
DefaultClass¶
Reference to a UMjDefault component for default class inheritance. Set via detail customization dropdown.
- Type: UMjDefault*
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
Functions¶
Public Functions¶
General¶
| Function | Returns | Description |
|---|---|---|
SyncUnrealTransformFromMj() |
void | Synchronizes the Unreal Component transform (Scale/Location/Rotation) |
SetGeomVisibility() |
void | Sets visibility for this geom and its child visual components. |
GetVisualizerMesh() |
class UStaticMeshComponent* |
Returns the built-in visualizer mesh if it exists. |
ApplyOverrideMaterial() |
void | Apply a material to the visual mesh. Override in subclasses with direct member access. |
GetMj() |
GeomView& | Semantic accessor for raw MuJoCo data and helper methods. |
GetResolvedMaterialName() |
FString |
Resolves the codegen-owned material FString through the default class chain. Returns empty if none found. |
SizeParamsCount() |
int32 |
Number of size parameters explicitly provided in XML. |
RegisterToSpec() |
void | Registers this geom to the MuJoCo spec. |
SyncUnrealTransformFromMj¶
Synchronizes the Unreal Component transform (Scale/Location/Rotation)
- Signature:
SyncUnrealTransformFromMj()
SetGeomVisibility¶
Sets visibility for this geom and its child visual components.
- Signature:
SetGeomVisibility(boolbNewVisibility)
GetVisualizerMesh¶
Returns the built-in visualizer mesh if it exists.
- Signature:
GetVisualizerMesh() - Returns: class UStaticMeshComponent*
ApplyOverrideMaterial¶
Apply a material to the visual mesh. Override in subclasses with direct member access.
- Signature:
ApplyOverrideMaterial(class UMaterialInterface*Material)
GetMj¶
Semantic accessor for raw MuJoCo data and helper methods.
- Signature:
GetMj() - Returns: GeomView&
GetResolvedMaterialName¶
Resolves the codegen-owned
materialFString through the default class chain. Returns empty if none found.
- Signature:
GetResolvedMaterialName() - Returns: FString
SizeParamsCount¶
Number of size parameters explicitly provided in XML.
- Signature:
SizeParamsCount() - Returns: int32
RegisterToSpec¶
Registers this geom to the MuJoCo spec.
- Signature:
RegisterToSpec(class FMujocoSpecWrapper& Wrapper,mjsBody*ParentBody)
MuJoCo|Geom¶
| Function | Returns | Description |
|---|---|---|
DecomposeMesh() |
void | Runs CoACD decomposition on this geom's mesh and creates persistent hull sub-geom components. |
RemoveDecomposition() |
void | Removes all hull sub-geoms created by decomposition and re-enables this geom. |
DecomposeMesh¶
Runs CoACD decomposition on this geom's mesh and creates persistent hull sub-geom components.
- Signature:
DecomposeMesh() - Blueprint: 🔵 Callable
RemoveDecomposition¶
Removes all hull sub-geoms created by decomposition and re-enables this geom.
- Signature:
RemoveDecomposition() - Blueprint: 🔵 Callable
MuJoCo|Runtime¶
| Function | Returns | Description |
|---|---|---|
UpdateGlobalTransform() |
void | Updates the Unreal SceneComponent transform to match the MuJoCo simulation state. |
GetWorldLocation() |
FVector |
Gets the current world location from MuJoCo. |
SetFriction() |
void | Sets the sliding friction at runtime. |
UpdateGlobalTransform¶
Updates the Unreal SceneComponent transform to match the MuJoCo simulation state.
- Signature:
UpdateGlobalTransform() - Blueprint: 🔵 Callable
GetWorldLocation¶
Gets the current world location from MuJoCo.
- Signature:
GetWorldLocation() - Blueprint: 🔵 Callable
- Returns: FVector
SetFriction¶
Sets the sliding friction at runtime.
- Signature:
SetFriction(floatNewFriction) - Blueprint: 🔵 Callable