Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to use Farseer to make a tile engine, but bodies that are not colliding with a sprite are still having an effect on it.

In this image there is a single sprite(the green box) and a single tile. The sprite rests right up against the tile like it should.

http://imageshack.us/photo/my-images/707/2012080501213451.png/

and in this one there are 2 tiles. The sprite is not colliding with the tile on the right, but when the tile is placed the sprite moves a few pixels upwards and cannot move to the right as if it was hitting the edge of the right tile. Then when the tile is removed, the sprite falls back down and everything is fine again.

http://imageshack.us/photo/my-images/267/2012080501213808.png/

I have gone through the debugging, everything has the values I would expect and my OnCollision method is only being called by the tile that is actually colliding with the sprite.

The only thing I'm doing that might not be "normal" is reusing bodies for the tiles near the sprite and just moving their positions every frame(I'm 100% they're being moved to the right spots). Could this be causing the problem somehow?

share|improve this question

put on hold as off-topic by Josh Petrie yesterday

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Have you tried using the Farseer DebugView? It might help you see what's actually going on. –  Benixo Aug 5 '12 at 7:32
    
Yes I have, everything looks as expected. –  Mike Jones Aug 5 '12 at 8:03
    
@MikeJones Your images have been taken down. –  Richard Marskell - Drackir Sep 11 '12 at 19:46