AI Command Lab // Flight Simulator
104B: The Collider Shell
Initial AI Output (Fragile)
// AI-Generated Code: Crash Hazard
void OnCollisionEnter(Collision c) {
Destroy(gameObject);
}
// Audit Fail: The player will bounce off the coin like a brick wall
// BEFORE collecting it.
Initial AI Prompt
"You ask the AI: "Make a coin I can pick up.""
Pilot Comm Link
Mission Objective: Use AudioSource.PlayOneShot to prevent sounds from clipping or cutting each other off.
Optimized Protocol
// Corrected: Ghost Pass
void OnTriggerEnter(Collider other) {
Destroy(gameObject);
}