amethyst / evoli

An ecosystem-simulation game made with Amethyst
https://community.amethyst.rs/t/evoli-introduction/770
Other
217 stars 33 forks source link

Avoid divide-by-zero in SeekSystem #83

Closed caitp closed 5 years ago

caitp commented 5 years ago

Normalizing the vector when the magnitude is 0 will result in a divide by zero, leading to invalid velocities that break things elsewhere in the program (I dunno why this doesn't trigger floating point exceptions before leading to these problems, tho? haven't looked into it)