UMjBallJoint¶
Specific Ball Joint component.
| Attribute | Value |
|---|---|
| Kind | Class |
| UE Macro | UCLASS |
| Inherits | UMjJoint |
| Blueprint Spawnable | ✅ Yes |
Properties¶
Public Properties¶
| Property | Type | Description |
|---|---|---|
m_JointView |
JointView | The runtime view of the MuJoCo joint. Valid only after Bind() is called. |
MjClassName |
FString |
Optional MuJoCo class name to inherit defaults from. |
Type |
EMjJointType | The type of joint (Hinge, Slide, Ball, Free). Default: Hinge (MuJoCo builtin). |
Axis |
FVector |
Local joint axis vector (relative to parent body). Ignored for Free/Ball joints. |
Ref |
float |
Value at reference configuration (qpos0). Radians for hinge, cm for slide. |
SpringRef |
float |
Reference position for the spring. |
Armature |
float |
Armature inertia/mass added to the joint. |
FrictionLoss |
float |
Friction loss (dry friction). |
bLimited |
bool |
Whether the joint limits are enabled. |
Margin |
float |
Constraint margin. |
Group |
int32 |
m_JointView¶
The runtime view of the MuJoCo joint. Valid only after Bind() is called.
- Type: JointView
MjClassName¶
Optional MuJoCo class name to inherit defaults from.
- Type: FString
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: Mj Joint
Type¶
The type of joint (Hinge, Slide, Ball, Free). Default: Hinge (MuJoCo builtin).
- Type: EMjJointType
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: Mj Joint
- Notes: Override-enabled (
bOverride_Type)
Axis¶
Local joint axis vector (relative to parent body). Ignored for Free/Ball joints.
- Type: FVector
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: Mj Joint
- Notes: Override-enabled (
bOverride_Axis)
Ref¶
Value at reference configuration (qpos0). Radians for hinge, cm for slide.
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: Mj Joint
- Notes: Override-enabled (
bOverride_Ref)
SpringRef¶
Reference position for the spring.
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: Mj Joint|Physics
- Notes: Override-enabled (
bOverride_SpringRef)
Armature¶
Armature inertia/mass added to the joint.
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: Mj Joint|Physics
- Notes: Override-enabled (
bOverride_Armature)
FrictionLoss¶
Friction loss (dry friction).
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: Mj Joint|Physics
- Notes: Override-enabled (
bOverride_FrictionLoss)
bLimited¶
Whether the joint limits are enabled.
- Type: bool
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: Mj Joint|Limits
- Notes: Override-enabled (
bOverride_Limited)
Margin¶
Constraint margin.
- Type: float
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: Mj Joint|Limits
- Notes: Override-enabled (
bOverride_Margin)
Group¶
Override-enabled (
bOverride_Group)
- Type: int32
- Editor: ✏️ EditAnywhere
- Blueprint: 🔵 ReadWrite
- Category: MuJoCo|Joint
Functions¶
Public Functions¶
General¶
| Function | Returns | Description |
|---|---|---|
ImportFromXml() |
void | Imports properties and override flags directly from the raw XML node. |
RegisterToSpec() |
void | Registers this joint to the MuJoCo spec. |
GetMj() |
JointView& | Semantic accessor for raw MuJoCo data and helper methods. |
GetMjName() |
FString |
Gets the full prefixed name of this joint as it appears in the compiled MuJoCo model. |
GetResolvedType() |
EMjJointType | Returns the resolved joint type. |
GetResolvedAxis() |
FVector |
Returns the resolved axis (UE coordinates). |
GetResolvedRange() |
FVector2D |
Returns the resolved range [min, max]. (0,0) if unlimited. |
GetResolvedLimited() |
bool |
Returns whether limits are resolved as enabled. |
ImportFromXml¶
Imports properties and override flags directly from the raw XML node.
- Signature:
ImportFromXml(const class FXmlNode*Node, const FMjCompilerSettings& CompilerSettings)
RegisterToSpec¶
Registers this joint to the MuJoCo spec.
- Signature:
RegisterToSpec(class FMujocoSpecWrapper& Wrapper,mjsBody*ParentBody)
GetMj¶
Semantic accessor for raw MuJoCo data and helper methods.
- Signature:
GetMj() - Returns: JointView&
GetMjName¶
Gets the full prefixed name of this joint as it appears in the compiled MuJoCo model.
- Signature:
GetMjName() - Returns: FString
GetResolvedType¶
Returns the resolved joint type.
- Signature:
GetResolvedType() - Returns: EMjJointType
GetResolvedAxis¶
Returns the resolved axis (UE coordinates).
- Signature:
GetResolvedAxis() - Returns: FVector
GetResolvedRange¶
Returns the resolved range [min, max]. (0,0) if unlimited.
- Signature:
GetResolvedRange() - Returns: FVector2D
GetResolvedLimited¶
Returns whether limits are resolved as enabled.
- Signature:
GetResolvedLimited() - Returns: bool
MuJoCo|Runtime¶
| Function | Returns | Description |
|---|---|---|
GetPosition() |
float |
Gets the current joint position (angle/slide). |
SetPosition() |
void | Sets the joint position (angle/slide) directly in mjData. |
GetVelocity() |
float |
Gets the current joint velocity. |
SetVelocity() |
void | Sets the joint velocity. |
GetAcceleration() |
float |
Gets the joint acceleration (qacc). Valid for 1-DOF joints (Hinge/Slide). Returns 0 for others. |
GetJointRange() |
FVector2D |
Gets the joint range [min, max] from the compiled model. Returns (0,0) if limits are disabled. |
GetJointState() |
FMuJoCoJointState | Gets the complete runtime state (Pos, Vel, Accel) for this joint. |
GetWorldAnchor() |
FVector |
Gets the world-space anchor position of this joint (UE coordinates, cm). |
GetWorldAxis() |
FVector |
Gets the world-space axis of this joint (unit vector, UE coordinates). |
GetPosition¶
Gets the current joint position (angle/slide).
- Signature:
GetPosition() - Blueprint: 🔵 Callable
- Returns: float
SetPosition¶
Sets the joint position (angle/slide) directly in mjData.
- Signature:
SetPosition(floatNewPosition) - Blueprint: 🔵 Callable
GetVelocity¶
Gets the current joint velocity.
- Signature:
GetVelocity() - Blueprint: 🔵 Callable
- Returns: float
SetVelocity¶
Sets the joint velocity.
- Signature:
SetVelocity(floatNewVelocity) - Blueprint: 🔵 Callable
GetAcceleration¶
Gets the joint acceleration (qacc). Valid for 1-DOF joints (Hinge/Slide). Returns 0 for others.
- Signature:
GetAcceleration() - Blueprint: 🔵 Callable
- Returns: float
GetJointRange¶
Gets the joint range [min, max] from the compiled model. Returns (0,0) if limits are disabled.
- Signature:
GetJointRange() - Blueprint: 🔵 Callable
- Returns: FVector2D
GetJointState¶
Gets the complete runtime state (Pos, Vel, Accel) for this joint.
- Signature:
GetJointState() - Blueprint: 🔵 Callable
- Returns: FMuJoCoJointState
GetWorldAnchor¶
Gets the world-space anchor position of this joint (UE coordinates, cm).
- Signature:
GetWorldAnchor() - Blueprint: 🔵 Callable
- Returns: FVector
GetWorldAxis¶
Gets the world-space axis of this joint (unit vector, UE coordinates).
- Signature:
GetWorldAxis() - Blueprint: 🔵 Callable
- Returns: FVector