Tier 2
Series 104
104G: The Physics Exam
Capstone Exam
"The physics simulation is broken. The car falls through the floor, the jump height varies wildly depending on the computer speed, and the coins block the car like concrete walls. Identify the three critical physics failures."
Target Asset for Audit
FRAGILE_CODE_DETECTED
using UnityEngine;
public class CarController : MonoBehaviour {
public Rigidbody rb;
// Audit Requirement: Lesson 104A (Rigidbody)
// Error 1: Teleporting a Rigidbody
void Move() {
transform.position += transform.forward * 10 * Time.deltaTime;
}
// Audit Requirement: Lesson 104B (Colliders)
// Error 2: Solid Coin
// The Coin script (not shown) uses OnCollisionEnter instead of OnTriggerEnter.
// Audit Requirement: Lesson 104F (FixedUpdate)
// Error 3: Physics in Update
void Update() {
if (Input.GetKeyDown(KeyCode.Space))
rb.AddForce(Vector3.up * 500);
}
}