what is the easiest way to make a hitbox that rotates with it's texture
Posted
by
Matthew Optional Meehan
on Game Development
See other posts from Game Development
or by Matthew Optional Meehan
Published on 2014-06-03T00:05:17Z
Indexed on
2014/06/03
3:44 UTC
Read the original article
Hit count: 245
In xna when you have a sprite that doesnt rotate it's very easy to get the four corner of a sprite to make a hitbox, but when you do a rotation the points get moved and I assume there is some kind of math that I can use to aquire them.
I am using the four points to draw a rectangle that visually represents the hitboxes.
I have seen some per-pixel collission examples but I can forsee they would be hard to draw a box/'convex hull' around.
I have also seen physics like farseer but I'm not sure if there is a quick tutorial to do what I want.
What do you guys think is the best approach becuase I am looking to complete this work by the end of the week.
© Game Development or respective owner