This project has moved. For the latest updates, please go here.

Newbie Question: How do hitboxes work?

Topics: Developer Forum, User Forum
May 27, 2011 at 10:27 AM

Okay so I'm very new to farseer and XNA so sorry if this question is a bit newbie. So how exactly do hitboxes work in farseer? From what I've seen so far you usually make your fixture have a basic polygon shape (like a rectangle or circle), and just have a texture that is your actual sprite. Now lets say I want to make a weapon for a character that is in a L shape (like a scythe or something). The easiest way would be to make a rectangle for the staff/handle part of it, then another one for the actual blade part of it at the end. How do you make a fixture have a multi-polygon shape? Can you assign multiple shapes to it or is there a way to combine polygon shapes into one shape? This also applies to anything large or complicated that would need a multipolygon hitbox type thing.

Am I thinking of this completely wrong is there a way to just make a image's sprite automatically be its hitbox kind of?