As I wrote in another thread, I'm trying to figure out how to port the logic of a tile based platform game to Farseer.
An issue that popped up is the ladders: currently the tile map is scanned and all ladders are extracted; eventually they get turned into a single object (EarclipDecomposer + CompoundPolygon) and the whole thing is flagged as a sensor.
Works great... but: in the tile world, knowing where the ladder is allows to recenter the character when he goes up and down, so if you enter the ladder and don't line up properly, it's easy to recenter the character.
In this case, it is a bit harder because the ladder is really a compound poly so it is a bunch of rectangles and I do not get a collision manifold as the ladder is a sensor (to not affect anything).
I'm trying to find out:
- how I can get a collision point from a body / sensor collision
- is there a speed disadvantage to have all ladders as a compound body? overall everything is inside that big body all the time, so I assume collisions must be done constantly against all rectangles (ladders) inside. Would it be better to make the ladders
separate sensor objects? (thus simplifying the collision as well)