Game Development Reference
In-Depth Information
But, if we think about the order of events for a moment, it begins to make sense:
• When the first box collides with the ground plane, this turns both objects (the
box and the ground plane) white.
• The second box then collides with the first turning the second box white,
while the first box stays white.
• Next, the second box separates from the first box, meaning both objects turn
• Finally, the second box collides with the ground plane, turning the box white
once again.
What was the last color that the first box turned to? The answer is black, because the
last event it was involved in was a separation with the second box. But, how can the
box be black if it's touching something? This is an intentional design consequence of
Search WWH ::

Custom Search