dedesite
02-07-2008 14:53:06
Hi all,
I've got a problem when I call setScale on a mesh wich is also a triangle mesh.
The viewable mesh is scale at the right proportion, but the triangleMesh keep the standard proportion (which correspond to the 1, 1, 1 proportion).
Here is how I create my triangle mesh :
I can't find a method to set the size of a TriangleMeshCollisionShape.
Thanks,
Andréas
I've got a problem when I call setScale on a mesh wich is also a triangle mesh.
The viewable mesh is scale at the right proportion, but the triangleMesh keep the standard proportion (which correspond to the 1, 1, 1 proportion).
Here is how I create my triangle mesh :
StaticMeshToShapeConverter *trimeshConverter = new StaticMeshToShapeConverter(entity);
TriangleMeshCollisionShape *sceneTriMeshShape = trimeshConverter->createTrimesh();
delete trimeshConverter;
RigidBody *sceneRigid = new RigidBody(
entity->getName() + "Rigid" + StringConverter::toString(mNumEntitiesInstanced),
mWorld);
sceneRigid->setStaticShape(node, sceneTriMeshShape, bodyRestitution, bodyFriction, pos);
//sceneRigid->getBulletObject()->getWorldTransform()
mEntities.push_back(entity);
mBodies.push_back(sceneRigid);
mNumEntitiesInstanced++;
return sceneRigid;
I can't find a method to set the size of a TriangleMeshCollisionShape.
Thanks,
Andréas