for my collision handling, it would be best if i had a bounding volume or mesh that contains all the space used by an arbitrary mesh before and after the movement and all space between them. i shall give an example:
i'm an arrow. i'm made out of 50 triangles, and i'm moving quickly. now, instead of beaming through a wall due to low fps and high speed movement, i'd rather like to create a bounding mesh by connecting all old vertices (old position) with all new ones (after movement) to create something that looks like a distorted arrow and check that thing for collisions. currently, i'm using a ray from the old to the new position, but this method fails when checking against non-complete-solid-world-geometry.
Why don't you use a Ray instead?
- Position its origin at it current location at the end of your collision detection update.
- Next update, set the Rays direction according to the Rays origin and its new position.
- Obtain pick results for all appropriate nodes to collide with.
- Loop pick data storing the lowest distance found.
- If the distance travelled by the Arrow since the last update is greater than the lowest distance found then a collision has occurred.
You can merge the bounds before movement and after movement to get the total bounds.
once again, chaos is the answer:
every frame i shoot a ray from somewhere inside my bounds to somewhere inside my future bounds, not only from center to center. this isn't perfect, but no one will care about the difference…