Question about Helloworld demo

peacemoon
Posts: 15
Joined: Wed Sep 03, 2008 12:52 pm

Question about Helloworld demo

Post by peacemoon »

Hello,
i hope someone can help me find out, why we set Origin of groundTransform at (0,-56,0) (i mean why -56) in these codes which i take from the Helloworld demo
btCollisionShape* groundShape = new btBoxShape(btVector3(btScalar(50.),btScalar(50.),btScalar(50.)));

//keep track of the shapes, we release memory at exit.
//make sure to re-use collision shapes among rigid bodies whenever possible!
btAlignedObjectArray<btCollisionShape*> collisionShapes;

collisionShapes.push_back(groundShape);

btTransform groundTransform;
groundTransform.setIdentity();
groundTransform.setOrigin(btVector3(0,-56,0));
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Question about Helloworld demo

Post by sparkprime »

the ground is a 100m x 100m x 100m block, so putting it at -56 would mean the top of the box is 6m below the origin.