New answers tagged

0

I found that I must add gravity to the velocity before add velocity to the position. And I have also changed collision code. public override void Update(GameTime gameTime) { velocity.Y += gravity; position += velocity * (float)gameTime.ElapsedGameTime.TotalSeconds; } public void CheckBounce(SpriteGameObject other) { ...


Top 50 recent answers are included