SimpleInputSimulatorDocumentation

Simulate Axis Input

Axis Input Node

NodeDescription
Simulate Axis InputSimulate analog input values (movement, mouse delta, gamepad sticks)

Parameters:

  • Key: Axis input key (Mouse X/Y, Gamepad Left Thumbstick X/Y, etc.)
  • Axis Value: 3D vector for input values (typically use X component)
  • Player Index: Target player controller (0 = first player)

Axis Input Usage

The node reads the current frame’s DeltaTime; callers do not pass it in.

Mouse and Stick Example

The graph sends right thumbstick Y input to the first local player each frame. When adapting it, choose the axis key from your project’s input mapping and check the received value or character behavior.

Axis Input Usage

Use the same setup to test mouse motion or a different stick axis.

AI Behavior Debugging

Let AI control a character through the input system to verify the complete path from input to behavior:

// AI 决策:向右移动
SimulateAxisInput(Gamepad_LeftX, FVector(1.0, 0, 0))
// AI 决策:开火
SimulateKeyInput(Gamepad_RightTrigger, true)

This lets you inspect how simulated input is processed into character behavior.

Local Multiplayer Testing

Test a two-player game alone by controlling the second player with a script:

// 玩家1:手动操作
// 玩家2:脚本控制
SimulateKeyInput(W, true, 1) // 玩家2 前进
SimulateAxisInput(MouseX, ..., 1) // 玩家2 转向