rogerdv
19-07-2010 20:20:03
After successfully making my first test with a plane I ofund that if I replace the plane with a mesh (a terrain made in Blender), it falls too. Im thinking that it happnes because its mass isnt zero, am I right?
The second question is, what shape should I use for irregular (tree, houses, terrains) meshes? And for animated meshes?
dodgydan2001
21-07-2010 21:58:02
Yes you have to specify zero mass for static objects.
rogerdv
21-07-2010 22:11:17
Thanks! About the other questions, any help?
For trees and houses you can use TriangleMeshCollisionShape or directly use btScaledBvhTriangleMeshShape if you want to group many instances of the same mesh into a single collision group and also have them be different sizes (useful for trees).
For terrain you can use OgreBulletCollisions::HeightmapCollisionShape.
- Fish
rogerdv
22-07-2010 12:34:15
Trees and other elements should have mass=0 too?
Yes. Unless you want your trees to move around. A mass of zero tells bullet that the physics body is static, it doesn't move and it cannot be moved by dynamic objects regardless of the dynamic objects mass.
The
Bullet Wiki has a lot of great information on it and many practical tips.
- Fish
rogerdv
23-07-2010 13:45:53
Hmm, for some reason the official bullet site is inaccessible to me, Ill have to try with some external proxy. Thanks for your help!