# Farseer: ApplyForce problem

I just tried Farseer and everything is working great. My problem is, that on touch the player should get an force up. Although the touch event works well, the player did not get an force!

Here my code:

 public void Update()
{

if (acceleration.Y < 0)
{
body.Rotation += ConvertUnits.ToSimUnits(0.05f);
}

if (acceleration.Y > 0)
{
body.Rotation -= ConvertUnits.ToSimUnits(0.05f);
}

while (TouchPanel.IsGestureAvailable)
{
if (gesture.GestureType == GestureType.Tap || gesture.GestureType == GestureType.Flick)
{
Debug.WriteLine("Okey");
body.ApplyForce(new Vector2(0, -20));
}
}
}

public void Draw(SpriteBatch spriteBatch)
{
spriteBatch.Draw(playertexture, ConvertUnits.ToDisplayUnits(body.Position),null,Color.White, ConvertUnits.ToDisplayUnits(body.Rotation), new Vector2(playertexture.Width / 2, playertexture.Height / 2), 1f,SpriteEffects.None, 0f);
}

• Does "Okey" get written? – Benixo May 17 '12 at 16:02
• Yes "Okey" gets written :D – Michael May 17 '12 at 16:05
• Force up should be (new Vector2(0, 20)? Also is that your entire update loop? I don't know Farseer but, you seem to be missing the physics update. Usually you call update on the physics engine so it can apply the forces to the bodies, detect collisions and so on. – MichaelHouse May 17 '12 at 16:11
• In by main Update loop i call: player.Update(); and the pyhsik update – Michael May 17 '12 at 16:16