Tier 3
Series 205
205G: The Control Exam
Capstone Exam
"The flight stick is unresponsive. The ship moves faster diagonally, the gamepad drift is spinning the camera, and the "Fire" button doesn't work on the controller. Identify the three critical input failures."
Target Asset for Audit
FRAGILE_CODE_DETECTED
using UnityEngine;
public class FlightStick : MonoBehaviour {
public float speed = 10f;
void Update() {
// Audit Requirement: Lesson 205A (Action Abstraction)
// Error 1: Hardcoded Hardware
if (Input.GetKeyDown(KeyCode.Space)) Fire();
// Audit Requirement: Lesson 205C (Composites)
// Error 2: Non-Normalized Movement
float x = Input.GetAxis("Horizontal");
float y = Input.GetAxis("Vertical");
// Moving (1,1) results in magnitude 1.4
transform.Translate(new Vector3(x, y, 0) * speed * Time.deltaTime);
// Audit Requirement: Lesson 205D (Processors/Deadzone)
// Error 3: Raw Input Drift
// No deadzone logic applied to the raw axis data.
}
}