Skip to content

AMjImpulseLauncher

Applies a one-shot MuJoCo force impulse to a target MjBody.

Place in level, set TargetBody reference and ImpulseStrength. Fire via Blueprint (FireImpulse), input action, or auto-fire on BeginPlay. The impulse direction is taken from the actor's forward vector, so aim the actor at the target. For the teaser video perturbation shot: attach a static mesh (crate) as a Quick Convert body, then use this actor to launch it at the robot.

Attribute Value
Kind Class
UE Macro UCLASS
Inherits AActor

Properties

Public Properties

Property Type Description
TargetActor AActor* The target actor to apply the impulse to. Must be an MjArticulation or have an MjQuickConvertComponent.
TargetBodyName FName Optional: name of a specific MjBody component on the target actor. If empty, uses the first MjBody found.
LaunchSpeed float Launch speed in m/s. Sets the body's velocity directly (like throwing it).
DirectionOverride FVector Direction override. If zero, uses the actor's forward vector. In Unreal world space.
LaunchTarget AActor* Optional: an actor to launch AT. Overrides direction — computes a ballistic arc toward this target.
ArcHeight float Arc height as a fraction of the distance to target. 0 = flat, 0.5 = high lob. Only used with LaunchTarget.
bAutoFire bool If true, fires automatically on BeginPlay after the delay.
AutoFireDelay float Delay in seconds before auto-fire (only used if bAutoFire is true).
bResetAndFire bool Tick this in the editor Details panel during PIE to reset + fire. Auto-clears.

TargetActor

The target actor to apply the impulse to. Must be an MjArticulation or have an MjQuickConvertComponent.

  • Type: AActor*
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Impulse

TargetBodyName

Optional: name of a specific MjBody component on the target actor. If empty, uses the first MjBody found.

  • Type: FName
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Impulse

LaunchSpeed

Launch speed in m/s. Sets the body's velocity directly (like throwing it).

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

DirectionOverride

Direction override. If zero, uses the actor's forward vector. In Unreal world space.

  • Type: FVector
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Impulse

LaunchTarget

Optional: an actor to launch AT. Overrides direction — computes a ballistic arc toward this target.

  • Type: AActor*
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Impulse

ArcHeight

Arc height as a fraction of the distance to target. 0 = flat, 0.5 = high lob. Only used with LaunchTarget.

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Impulse
  • Notes: Override-enabled (LaunchTarget)

bAutoFire

If true, fires automatically on BeginPlay after the delay.

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

AutoFireDelay

Delay in seconds before auto-fire (only used if bAutoFire is true).

  • Type: float
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: MuJoCo|Impulse
  • Notes: Override-enabled (bAutoFire)

bResetAndFire

Tick this in the editor Details panel during PIE to reset + fire. Auto-clears.

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

Protected Properties

Property Type Description
DirectionArrow UArrowComponent*

DirectionArrow

  • Type: UArrowComponent*
  • Editor: 👁 VisibleAnywhere
  • Blueprint: 🟢 ReadOnly
  • Category: MuJoCo|Impulse

Functions

Public Functions

MuJoCo|Impulse

Function Returns Description
FireImpulse() void Fire the impulse. Can be called from Blueprint, input binding, or Sequencer event track.
ResetAndFire() void Teleport the projectile back to the launcher's position and fire.
FireImpulse

Fire the impulse. Can be called from Blueprint, input binding, or Sequencer event track.

  • Signature: FireImpulse()
  • Blueprint: 🔵 Callable
ResetAndFire

Teleport the projectile back to the launcher's position and fire.

  • Signature: ResetAndFire()
  • Blueprint: 🔵 Callable

Private Functions

General

Function Returns Description
ResolveTargetBody() UMjBody* Resolve TargetActor into an MjBody pointer. Called once on first fire.
ResolveTargetBody

Resolve TargetActor into an MjBody pointer. Called once on first fire.

  • Signature: ResolveTargetBody()
  • Returns: UMjBody*