Sunday, April 11, 2010
Mapmodel Mesh Collisions
The video shows a mapmodel with mesh collisions - so the player can collide with the mapmodel properly, and not with a bounding box. Note how the player can move through the holes in the model (but not through where the model is solid).
The mesh data is read from the sauer model, and converted and passed to Bullet, which handles the collisions. Scripts can also, optionally, create collision meshes on the fly.
EDIT: Btw, this is still a little buggy. For example, you need to rotate the mapmodel 180 degrees, and it doesn't notice other rotations for now. Use the bullet debugging option to see what is going on (/bulletdebug 1). EDIT 2: Fixed.