Page 1 of 1

Animated mesh collision

Posted: Fri Jun 13, 2008 10:14 am
by ChrisN
Hi, what is the best method for having collision against a animated mesh model?

cheers
/ Christoffer

Re: Animated mesh collision

Posted: Fri Jun 13, 2008 8:30 pm
by Zukarakox
GOODLUCK SIR!

Re: Animated mesh collision

Posted: Fri Jun 13, 2008 9:50 pm
by Norbo
It isn't extremely practical to do a per-triangle test in this situation, so I would recommend testing against proxy shapes that are transformed by the animation of the bones. So instead of testing against a mesh, you'll test against a set of objects (such as capsules representing parts of the arm, etc.).

This will work for raycasting purposes, but for normal game interaction and movement I would recommend just bounding your character in a single shape like a capsule for environmental collisions.

If you aren't talking about characters specifically but instead just a morphing mesh in general, it is technically possible to deform a StaticTriangleGroup in real time as long as the overall connectivity of the shape is maintained. This isn't a dynamic construct, but other physically simulated objects will respond to its motion to some degree and bounce off of it correctly (though due to its 'teleporty' nature it might not look great in all cases.)