Animated mesh collision

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
ChrisN
Posts: 4
Joined: Fri Jun 13, 2008 7:48 am

Animated mesh collision

Post by ChrisN »

Hi, what is the best method for having collision against a animated mesh model?

cheers
/ Christoffer
User avatar
Zukarakox
Not a Site Admin
Posts: 426
Joined: Mon Jul 10, 2006 4:28 am

Re: Animated mesh collision

Post by Zukarakox »

GOODLUCK SIR!
i has multiple toes
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Animated mesh collision

Post 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.)
Post Reply