Skip to content

UMjInputHandler

Handles keyboard hotkeys for the MuJoCo simulation (debug toggles, pause, reset, etc.).

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

Properties

Private Properties

Property Type Description
LastLMBPressTime float Last time LMB was pressed (seconds since startup). Used to
bPrevCtrlLmbHeld bool Previous-frame Ctrl+LMB / Ctrl+RMB held state for press-edge
bPerturbationCameraLocked bool Whether we currently hold a camera-input lock on the player
TranslateClickScreen FVector2D Screen-space position of the cursor at Ctrl+RMB press, plus the
MouseDeltaProcessor TSharedPtr<FMjMouseDeltaProcessor> Slate input pre-processor that captures raw mouse deltas from

LastLMBPressTime

Last time LMB was pressed (seconds since startup). Used to

  • Type: float

bPrevCtrlLmbHeld

Previous-frame Ctrl+LMB / Ctrl+RMB held state for press-edge

  • Type: bool

bPerturbationCameraLocked

Whether we currently hold a camera-input lock on the player

  • Type: bool

TranslateClickScreen

Screen-space position of the cursor at Ctrl+RMB press, plus the

  • Type: FVector2D

MouseDeltaProcessor

Slate input pre-processor that captures raw mouse deltas from

  • Type: TSharedPtr

Functions

Private Functions

General

Function Returns Description
ProcessHotkeys() void Processes keyboard hotkeys for simulation control and debug toggles.
ProcessPerturbation() void Drives perturbation gestures: double-click-LMB select, Ctrl+RMB
LockCamera() void Pushes camera lock if not already held.
UnlockCamera() void Releases camera lock if held.
ProcessHotkeys

Processes keyboard hotkeys for simulation control and debug toggles.

  • Signature: ProcessHotkeys(APlayerController* PC)
ProcessPerturbation

Drives perturbation gestures: double-click-LMB select, Ctrl+RMB

  • Signature: ProcessPerturbation(APlayerController* PC, float DeltaTime)
LockCamera

Pushes camera lock if not already held.

  • Signature: LockCamera(class APlayerController* PC)
UnlockCamera

Releases camera lock if held.

  • Signature: UnlockCamera(class APlayerController* PC)