This project has moved and is read-only. For the latest updates, please go here.

crouching character?

Feb 9, 2009 at 8:00 PM
Hi all,

I am, like many others, trying to make an platformer with Farseer. My character exist of three geoms, two circles with a rectangle inbetween.  0=0 like that but turned 45 degrees. The thing I am looking for is to crouch the character, like this 0. I know I can create a spring but I need the rectangle so the circle doesn't get caught on stuff. Is it possible two squash a geom, or is there a smart way of doing this?

Feb 9, 2009 at 8:54 PM
Hmm. I'm not sure I follow you.

To answer your question about squashing a geometry: No, you can't change a geometry once it's created. It's a rigid body system, so it's not possible. You can however exchange one geometry for another. for example if you have your character extended and the crouch, you can change his geometry (by putting in another geometry) to fit one that looks like he is crouching.
Feb 9, 2009 at 9:59 PM
Thanks genbox!

Do you think I should swap geoms? or disable collsion on the ones I don't need to be active at the time? I am thinking of maybe 4 geoms total.

Feb 9, 2009 at 10:21 PM
If your character change shape, you should switch geometries. If your character does not switch shape or if he just "lose" some of his geometries, you should disable them (and now draw them if necessary).