Jul 27, 2011 at 12:14 PM
Edited Jul 27, 2011 at 12:20 PM
Hello! I'll try to explain my trouble, my english is very poor. I'm doing a game in WP7 using Farseer physics, it's a basketball game. My trouble is that the move of the ball is very slow when the gravity act in it.
I have a world created like this:
world = new World(new Vector2(0f, 20f));
And then, in update method:
world.Step(Math.Min((float)gameTime.ElapsedGameTime.TotalSeconds, (1f / 30f)));
I've the ball created like this:
body = BodyFactory.CreateCircle(world, 17, 1f);
body.CreateFixture(new PolygonShape(PolygonTools.CreateCircle(17, 10), 1f));
body.BodyType = BodyType.Dynamic;
body.Restitution = 0.8f;
And then, when I want to throw the ball I do:
body.ApplyForce(new Vector2(100000000000, -100000000000));
Why the ball is very very slow movement?
Only I do the ApplyForce once time when I want to throw the ball, is correct? Or I'va to ApplyForce in loop update?
And if I don't applyForce for that only act the gravity, it's the same that I put 20f that 2000f to the vector gravity, the ball down at the same velocity.
Thanks for all!