AI Command Lab // Flight Simulator
205C: The Composite Axis
Initial AI Output (Fragile)
// AI-Generated Code: Diagonal Speed Hack
void Update() {
if (Input.GetKey(KeyCode.W)) z += 1;
if (Input.GetKey(KeyCode.A)) x -= 1;
// Audit Fail: Moving Diagonal results in speed 1.41 (Square Root of 2).
}
Initial AI Prompt
"You ask the AI: "Move the player with WASD.""
Pilot Comm Link
Mission Objective: A skilled Pilot directs the AI to read the Value. You command: "Bind WASD to a Vector2 Composite and read the value directly in Update."
Optimized Protocol
// Corrected: Normalized Math Vector2 move = moveAction.ReadValue<Vector2>(); // The Input System handles normalization automatically.