Simulate Axis Input
Axis Input Node
| Node | Description |
|---|---|
Simulate Axis Input | Simulate 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)
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.
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 转向