AI Command Lab // Flight Simulator
103D: The Trigger State Machine
Initial AI Output (Fragile)
// AI-Generated Code: The "Safe" Fire
void OnTriggerEnter(Collider other) {
// Audit Fail: This runs exactly once.
// The player can stand in the fire forever without taking more damage.
ApplyDamage(10);
}
Initial AI Prompt
"You ask the AI: "Apply damage while the player is in the fire.""
Pilot Comm Link
Mission Objective: Use Root Motion to ensure the character movement perfectly matches the animation.
Optimized Protocol
// Corrected: Dangerous Fire
void OnTriggerStay(Collider other) {
// Runs every physics frame while inside
ApplyDamage(10);
}