Collision Error - objects getting stuck

Topics: Developer Forum
Dec 9, 2008 at 8:04 PM
Hello all,

I am currently working with a slightly-older version of Farseer that has some local modifications (by someone other than me, so I don't know how significant / important they are), and we are currently running into a problem.

I am curious in if the community can help me determine whether or not this is a Farseer error (and if so if it has been fixed / a fix for it), or an error with the local modifications.

The scenario is as follows: in the game we are developing, there are many objects that have rectangular bounding volumes. There are also some 'walls' on each side of the screen, to prevent objects from leaving the screen. When our characters points intersect the points of the objects along these walls, they are 'colliding' in such a way as to cause the character to stop moving.

I will show what I mean with images, as I am not entirely familiar with all the technical terms for items in the physics engine.

Getting stuck on subdivision/point/{insert proper technical term here}

What seems to be happening is that when the character runs over that point, if one of his two corners matches up with it exactly, he will stop being able to move forwards until he jumps or turns around.
This occasionally happens against walls on the side of the screen as well.
Dec 9, 2008 at 8:50 PM
Do you have a vertex (point) at each corner? Farseer also needs vertices along the sides of geometries. Try inserting more vertices.
Newer versions of Farseer contains a SubDivide method inside the Vertices class to help you to distribute vertices along sides.

You should also have a look at our manual:

Look at item number 2 under Known Issues. Hope this fixes your problem.
Dec 10, 2008 at 8:00 PM
Thanks...that seems to have been what it needed! Problem solved.