Grom
20-01-2007 22:07:29
I'm still just playing around with boxes. I have one box that is controllable with the WASD keys, like so:
I set up code to dump a bunch of boxes in front of this box like so (this is where I create the moveable box and a bunch of ones falling in a line):
This looks pretty cool, except the first box no longer moves with the amount of force applied to it. I notice that the more boxes I dump into the scene, the more force I have to apply to the first box in order to get it moving. Why is this?
if(m_InputReader->isKeyDown(KC_W))
myBody->addForce(Vector3(0,0,-50));
I set up code to dump a bunch of boxes in front of this box like so (this is where I create the moveable box and a bunch of ones falling in a line):
myBody = mScene->createBody("myCube", "Box01.mesh", new cubeShape(1.0f), 10.0f, Vector3(0,10,0) );
for(int i=0; i<10; i++)
mScene->createBody("cubes" + StringConverter::toString(i), "Box01.mesh", new cubeShape(1.0f), 10.0f, Vector3(0, 10 + i*10 ,-20) );
This looks pretty cool, except the first box no longer moves with the amount of force applied to it. I notice that the more boxes I dump into the scene, the more force I have to apply to the first box in order to get it moving. Why is this?