i have spend countless hours on it now and I'm still convinced that i should be relatively simple but it just keeps on making all kinds of errors.
is there someone out there who can explain i simple words how i can make my ball move via the ApplyTorque(); pleeeeeeease?
this is the code for creating the ball:
playerDef = new b2BodyDef();
circleDef = new b2CircleDef();
circleDef.radius = 50;
circleDef.density = 1.0;
circleDef.friction = 0.5;
circleDef.restitution = 0.5;
playerDef.position.Set(290,450);
playerDef.AddShape(circleDef);
playerDef.userData = new PlayerClass();
playerDef.userData.width = circleDef.radius * 2;
playerDef.userData.height = circleDef.radius * 2;
addChild(playerDef.userData);
m_world.CreateBody(playerDef);
is there someone out there who can explain i simple words how i can make my ball move via the ApplyTorque(); pleeeeeeease?
this is the code for creating the ball:
playerDef = new b2BodyDef();
circleDef = new b2CircleDef();
circleDef.radius = 50;
circleDef.density = 1.0;
circleDef.friction = 0.5;
circleDef.restitution = 0.5;
playerDef.position.Set(290,450);
playerDef.AddShape(circleDef);
playerDef.userData = new PlayerClass();
playerDef.userData.width = circleDef.radius * 2;
playerDef.userData.height = circleDef.radius * 2;
addChild(playerDef.userData);
m_world.CreateBody(playerDef);