After a while, working with 3 dimensional math, you get into the habit of just thinking in vectors. This only becomes a problem when, like me, you constantly confuse addition and subtractions.
Below is the simplest flocking I have available. 10 Boids are created and placed randomly across the screen, and they then decide to huddle together. The math is being done in 3 dimensions, though the Z direction is commented out because Flash Sprites don't have a .z property.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment