UMjSphere¶
Sphere primitive geometry.
| Attribute | Value |
|---|---|
| Kind | Class |
| UE Macro | UCLASS |
| Inherits | UMjGeom |
| Blueprint Spawnable | ✅ Yes |
Properties¶
Public Properties¶
| Property | Type | Description |
|---|---|---|
Radius |
float |
|
VisualizerMesh |
class UStaticMeshComponent* |
Internal-only visual mesh for the editor. |
m_GeomView |
GeomView | The runtime view of the MuJoCo geom. Valid only after Bind() is called. |
Type |
EMjGeomType | |
Size |
FVector |
|
bWasImported |
bool |
True when this component was created via ImportFromXml (i.e. loaded from a .xml file). |
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. |
FromToStart |
FVector |
Start point for fromto definition. |
FromToEnd |
FVector |
End point for fromto definition. |
bFromToResolvedHalfLength |
bool |
True when fromto was resolved at import — only the half-length slot is valid, radius comes from defaults. |
MjClassName |
FString |
Optional MuJoCo class name to inherit defaults from. |
MaterialName |
FString |
Optional MuJoCo material name for visual properties. |
Density |
float |
Density of the material (used for mass calculation if mass not implicit). |
Mass |
float |
Explicit mass of the geom (if provided, density is ignored). |
Margin |
float |
Collision margin (excludes contacts within this distance). |
Gap |
float |
Contact generation gap (includes contacts within this distance). |
Condim |
int32 |
Contact dimensionality (1, 3, 4, 6). |
Contype |
int32 |
Content type bitmask for collision filtering. |
Conaffinity |
int32 |
Content affinity bitmask for collision filtering (matches against other's contype). |
Priority |
int32 |
Collision priority (higher priority interactions override lower). |
Group |
int32 |
Visual/Collision group ID. |
SizeParamsCount |
int32 |
Number of size parameters explicitly provided in XML. |
Rgba |
FLinearColor |
RGBA Color of the geom. |
m_RefDefault |
UMjDefault* |
Radius¶
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Primitive
Type¶
Override-enabled (
bOverride_Type)
- Type: EMjGeomType
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
Size¶
Override-enabled (
bOverride_Size)
- Type: FVector
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
bWasImported¶
True when this component was created via ImportFromXml (i.e. loaded from a .xml file).
- Type: bool
- Editor: 👁 VisibleAnywhere
- Category: MuJoCo|Geom
MeshName¶
Name of the mesh asset if Type is Mesh.
- Type: FString
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- 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)
bIsDecomposedHull¶
True if this geom was created by CoACD decomposition of another geom.
- Type: bool
- Editor: 👁 VisibleAnywhere
- Category: MuJoCo|Geom
bDisabledByDecomposition¶
True if this geom's mesh was decomposed into hull sub-geoms.
- Type: bool
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
FromToStart¶
Start point for fromto definition.
- Type: FVector
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
- Notes: Override-enabled (
bOverride_FromTo)
FromToEnd¶
End point for fromto definition.
- Type: FVector
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
- Notes: Override-enabled (
bOverride_FromTo)
bFromToResolvedHalfLength¶
True when fromto was resolved at import — only the half-length slot is valid, radius comes from defaults.
- Type: bool
MjClassName¶
Optional MuJoCo class name to inherit defaults from.
- Type: FString
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
MaterialName¶
Optional MuJoCo material name for visual properties.
- Type: FString
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom
Density¶
Density of the material (used for mass calculation if mass not implicit).
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Physics
- Notes: Override-enabled (
bOverride_Density)
Mass¶
Explicit mass of the geom (if provided, density is ignored).
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Physics
- Notes: Override-enabled (
bOverride_Mass)
Margin¶
Collision margin (excludes contacts within this distance).
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Physics
- Notes: Override-enabled (
bOverride_Margin)
Gap¶
Contact generation gap (includes contacts within this distance).
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Physics
- Notes: Override-enabled (
bOverride_Gap)
Condim¶
Contact dimensionality (1, 3, 4, 6).
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Physics
- Notes: Override-enabled (
bOverride_Condim)
Contype¶
Content type bitmask for collision filtering.
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Collision
- Notes: Override-enabled (
bOverride_Contype)
Conaffinity¶
Content affinity bitmask for collision filtering (matches against other's contype).
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Collision
- Notes: Override-enabled (
bOverride_Conaffinity)
Priority¶
Collision priority (higher priority interactions override lower).
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Collision
- Notes: Override-enabled (
bOverride_Priority)
Group¶
Visual/Collision group ID.
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Collision
- Notes: Override-enabled (
bOverride_Group)
SizeParamsCount¶
Number of size parameters explicitly provided in XML.
- Type: int32
- Editor: 👁 VisibleAnywhere
- Category: MuJoCo|Geom
Rgba¶
RGBA Color of the geom.
- Type: FLinearColor
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Geom|Visual
- Notes: Override-enabled (
bOverride_Rgba)
m_RefDefault¶
- Type: UMjDefault*
- Editor: ✏️ EditAnywhere
- 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. |
GetMj() |
GeomView& | Semantic accessor for raw MuJoCo data and helper methods. |
ShouldOverrideSize() |
bool |
Returns true if the geom's size should be written to MuJoCo on export |
GetResolvedMaterialName() |
FString |
Resolves MaterialName through the default class chain. Returns empty if none found. |
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*
GetMj¶
Semantic accessor for raw MuJoCo data and helper methods.
- Signature:
GetMj() - Returns: GeomView&
ShouldOverrideSize¶
Returns true if the geom's size should be written to MuJoCo on export
- Signature:
ShouldOverrideSize() - Returns: bool
GetResolvedMaterialName¶
Resolves MaterialName through the default class chain. Returns empty if none found.
- Signature:
GetResolvedMaterialName() - Returns: FString
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: 🔧 CallInEditor
RemoveDecomposition¶
Removes all hull sub-geoms created by decomposition and re-enables this geom.
- Signature:
RemoveDecomposition() - Blueprint: 🔧 CallInEditor
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