This project has moved and is read-only. For the latest updates, please go here.

Geom Question

Topics: Developer Forum
Feb 3, 2009 at 10:54 AM
if i were to modify the contents of a geoms associated Vertices class sometime after it had been created would it screw up anything or would the shape of the geoms just change?
Feb 3, 2009 at 4:14 PM
Yes, it would screw up the geometry.

Several parts of the engine use the vertices to make collisions happen. Our distance grid is a good example. It is calculated from the geometry (Or more precise the bounding box of the geometry) if the vertices change in the geometry, you will need to recalculate the distance grid.

If you have several states (shapes) a geometry can take, It's easier and faster to preload all states before you use them and then just switch them out whenever you need to.
I'm not sure if the new narrow phase collision detection algorithms would change this.