I created world, 2 bodies (static and dynamic). But dynamic body don't fall.
Code: Select all
Vec2 v2min,v2max, v2gravity;
Body bodyGroundOne, tankArmor,;
v2gravity = new Vec2(0.0f, -10.0f);
aabbWorld = new AABB();
aabbWorld.lowerBound = new Vec2(-1000.0f, -1000.0f);
aabbWorld.upperBound = new Vec2(1000.0f, 1000.0f);
world = new World(aabbWorld, v2gravity, false);
bdGroundOne = new BodyDef();
bdGroundOne.position = new Vec2(100.0f, 400.0f);
bodyGroundOne = world.createBody(bdGroundOne);
PolygonDef g1shapeDef = new PolygonDef();
BodyDef bdTank = new BodyDef();
tankArmor = world.createBody(bdTank);
PolygonDef pdTank = new PolygonDef();
pdTank.density = 1.0f;
pdTank.friction = 0.3f;
pdTank.restitution = 0.1f;
tankArmor.m_mass = 10.0f;
///// then every 1/60 second i call
But tankArmor Body don't fall. I also tried to apply force and velocity to body, but it not helped.
I know that i missed something, I hope you could point to my mistake.
PS: i'm using version 2.0.1 (august 2008), should I use version from SVN instead?