Skip to content

AMjOrbitCameraActor

A cinematic orbit camera that auto-detects MjArticulations via a box trigger

and smoothly orbits around them. Designed for teaser/showcase video capture. Integrates with the replay system: - During recording, writes camera position/rotation to each replay frame - During playback, reads camera transforms back for consistent framing across scenes Place in the level, resize the box trigger to cover the area where robots operate. When an articulation enters the trigger, the camera locks onto it and orbits.

Attribute Value
Kind Class
UE Macro UCLASS
Inherits AActor

Properties

Protected Properties

Property Type Description
DetectionBox UBoxComponent*
CineCamera UCineCameraComponent*
ManualTarget AMjArticulation* Optional: manually assign the target articulation. If empty, auto-detects from overlap.
OrbitRadius float Orbit radius (distance from target) in cm.
OrbitSpeed float Orbit speed in degrees per second.
HeightOffset float Base height offset above the target's origin in cm.
HeightOscillationAmplitude float Amplitude of vertical oscillation in cm (0 = no bobbing).
HeightOscillationFrequency float Speed of vertical oscillation in cycles per orbit.
SmoothingSpeed float How quickly the camera lerps to its target position (higher = snappier).
LookAtHeightOffset float Vertical look offset — how far above the target root to aim (cm).
bAutoFrameRobot bool Auto-adjusts orbit radius to keep the full robot in frame.
FramingPadding float Padding multiplier for auto-framing (1.0 = tight, 1.5 = 50% padding).
MinOrbitRadius float Minimum orbit radius even when auto-framing (cm).
FocalLength float Focal length in mm. 35mm = wide, 85mm = portrait, 135mm = telephoto.
Aperture float Aperture (f-stop). Lower = more bokeh.
bAutoActivate bool Whether to activate this camera as the player's view on BeginPlay.
bRecordCameraPath bool If true, writes camera transforms to replay frames during recording.
bPlaybackCameraPath bool If true, reads camera transforms from replay frames during playback instead of orbiting live.
bIsOrbiting bool

DetectionBox

  • Type: UBoxComponent*
  • Editor: 👁 VisibleAnywhere
  • Blueprint: 🟢 ReadOnly
  • Category: MuJoCo|Orbit Camera

CineCamera

  • Type: UCineCameraComponent*
  • Editor: 👁 VisibleAnywhere
  • Blueprint: 🟢 ReadOnly
  • Category: MuJoCo|Orbit Camera

ManualTarget

Optional: manually assign the target articulation. If empty, auto-detects from overlap.

  • Type: AMjArticulation*
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Target

OrbitRadius

Orbit radius (distance from target) in cm.

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Orbit

OrbitSpeed

Orbit speed in degrees per second.

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Orbit

HeightOffset

Base height offset above the target's origin in cm.

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Orbit

HeightOscillationAmplitude

Amplitude of vertical oscillation in cm (0 = no bobbing).

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Orbit

HeightOscillationFrequency

Speed of vertical oscillation in cycles per orbit.

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Orbit

SmoothingSpeed

How quickly the camera lerps to its target position (higher = snappier).

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Orbit

LookAtHeightOffset

Vertical look offset — how far above the target root to aim (cm).

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Orbit

bAutoFrameRobot

Auto-adjusts orbit radius to keep the full robot in frame.

  • Type: bool
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Framing

FramingPadding

Padding multiplier for auto-framing (1.0 = tight, 1.5 = 50% padding).

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Framing

MinOrbitRadius

Minimum orbit radius even when auto-framing (cm).

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Framing

FocalLength

Focal length in mm. 35mm = wide, 85mm = portrait, 135mm = telephoto.

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Lens

Aperture

Aperture (f-stop). Lower = more bokeh.

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Lens

bAutoActivate

Whether to activate this camera as the player's view on BeginPlay.

  • Type: bool
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera

bRecordCameraPath

If true, writes camera transforms to replay frames during recording.

  • Type: bool
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Replay

bPlaybackCameraPath

If true, reads camera transforms from replay frames during playback instead of orbiting live.

  • Type: bool
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Orbit Camera|Replay

bIsOrbiting

  • Type: bool
  • Editor: 👁 VisibleAnywhere
  • Blueprint: 🟢 ReadOnly
  • Category: MuJoCo|Orbit Camera

Private Properties

Property Type Description
LastCameraWriteFrameIdx int32 Tracks the last replay frame index written to, to avoid duplicate writes.

LastCameraWriteFrameIdx

Tracks the last replay frame index written to, to avoid duplicate writes.

  • Type: int32

Functions

Public Functions

MuJoCo|Orbit Camera

Function Returns Description
ToggleOrbit() void Toggle orbit on/off.
GetCurrentCameraPosition() FVector Get the current computed camera position (for external use).
GetCurrentCameraRotation() FRotator Get the current computed camera rotation.
ToggleOrbit

Toggle orbit on/off.

  • Signature: ToggleOrbit()
  • Blueprint: 🔵 Callable 🔧 CallInEditor
GetCurrentCameraPosition

Get the current computed camera position (for external use).

  • Signature: GetCurrentCameraPosition()
  • Blueprint: 🔵 Callable 💎 Pure
  • Returns: FVector
GetCurrentCameraRotation

Get the current computed camera rotation.

  • Signature: GetCurrentCameraRotation()
  • Blueprint: 🔵 Callable 💎 Pure
  • Returns: FRotator

Private Functions

General

Function Returns Description
ComputeAutoFrameRadius() float Computes the desired orbit radius to keep the articulation fully in frame.
WriteCameraToReplayFrame() void Writes current camera transform to the replay manager's latest live frame.
ComputeAutoFrameRadius

Computes the desired orbit radius to keep the articulation fully in frame.

  • Signature: ComputeAutoFrameRadius()
  • Returns: float
WriteCameraToReplayFrame

Writes current camera transform to the replay manager's latest live frame.

  • Signature: WriteCameraToReplayFrame()