# Palomino - Crash Determination

©2004,2009 Jim E. Brooks http://www.palomino3d.org

- Index
- Crash Determination

## Crash Determination

[2008/03]

### Overview

Crash determination isn't part of the collision module.

A crash (fatal collision) is determined by both collision-detection and the physics model. collision-detection means nothing more than the intersection of graphical objects. So an aircraft could be in collision with a runway, but of course it hasn't necessarily crashed.

### Implementation

Both collision-detection and crash-determination are executed every timer-tick [Craft::Tick()]. Craft::Tick() calls the physics model [CraftPhysics::MoveObject()].

The physics model has to handle a Craft colliding into another Object. Along the way, it has to also do crash-determination. For example, if a Craft is in collision with a runway, downward velocity must be changed to zero (to counteract the force of gravity or the Craft would move down thru the runway). But downward velocity is also needed to determine if a crash occurred. It is what distinguishes between sitting on, or crash-diving into, the runway.

Currently, crash-determination is split across the physics model (CraftPhysics) and the Aircraft class. There are some causes of a crash that physics model doesn't have enough info needed for determination (such as names of Objects), so some determination is deferred to the higher-level (Aircraft is in the app-level).

Last modified: Sat Nov 7 14:41:11 CST 2009