nord
09-07-2008 22:41:35
Hi all. So far I have been using primitive collision (CubeShape(1,1,1)) boxes in my game. Now I wanted to use a custom collision box for my car. But my car falls from my terrain to infinity when I use a custom made mesh.
I did put a floor, so my car falls under the terrain until the floor. I can drive the car on the floor. that's fine.
interestingly,
I CAN HIT OTHER NORMAL OBJECTS ON THE FLOOR (like CubeShape(1,1,1) ). But I cannot hit another custom collision boxed object (like TriangleMeshShape("ConvexBody.mesh")). Here is my old working fine code and new problematic code:
And here is a screenshot
I did put a floor, so my car falls under the terrain until the floor. I can drive the car on the floor. that's fine.
interestingly,
I CAN HIT OTHER NORMAL OBJECTS ON THE FLOOR (like CubeShape(1,1,1) ). But I cannot hit another custom collision boxed object (like TriangleMeshShape("ConvexBody.mesh")). Here is my old working fine code and new problematic code:
mBody = mScene->createBody("bora; body.mesh;", new CubeShape(1.8,1.3,4.5),Pos, "mass: 1800");
mBody = mScene->createBody("bora; body.mesh;", new TriangleMeshShape("ConvexBody.mesh"),Pos, "mass: 1800");
And here is a screenshot