Below is a simple wrapper class I am making so that I can easly create objects. Currently I can Initilize bullet, create and draw box's, spheres, and triangle meshes. Before I work on this anymore ( currently it will do most of the things I need it to do ) I would like to know how my code is. Is there anything I am missing or that I might find useful to add?
Also why is it that I get a error when trying to find the local inertia for triangle meshes, also when setting the meshes's mass to anything other then 0 why does everything fall threw it.
Thanks.
Wrapper class, am I doing anything wrong?
-
- Posts: 5
- Joined: Thu Jan 17, 2008 8:51 pm
Wrapper class, am I doing anything wrong?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 5
- Joined: Thu Jan 17, 2008 8:51 pm
Re: Wrapper class, am I doing anything wrong?
Does anyone know how to properly add to a triangle mesh that has already been added to the world. Found out that the addTrianglesToMesh and updateMesh functions dont really work :S.. I have the drawing ofcouse but the collision body isnt updated, or something...
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Wrapper class, am I doing anything wrong?
btBvhTriangleMeshShape is only for static, non-moving, non-dynamic objects with mass zero. If you want to use moving objects, you can better approximate the shape using a btConvexHullShape, or btCompoundShape with multiple simple shapes. Alternatively use btGimpactMeshShape, see MovingConcaveDemo how to use this.Also why is it that I get a error when trying to find the local inertia for triangle meshes, also when setting the meshes's mass to anything other then 0 why does everything fall threw it.
You cannot add triangles to it, after construction.Osami wrote:Does anyone know how to properly add to a triangle mesh that has already been added to the world. Found out that the addTrianglesToMesh and updateMesh functions dont really work :S.. I have the drawing ofcouse but the collision body isnt updated, or something...
Hope this helps,
Erwin