What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Im working on a top down game, and I’m kinda lost on the collision detection.
Basically i want a character to stop moving when he hits another character. This wouldn’t be any problem in a tilebased game, but i haven’t really done any collision detection on complex shapes before.
Another thing is, the character shouldn’t be able to rotate through other characters or objects either.
Are there any engines that you can recommend, or can you point me to an article from where i can learn about this?
in advance: Thanks :)
Wouldn’t it be easier to have five centre points and radii for five circles (head, right shoulder, left shoulder, right hand, left hand) and check based on those? You’d need to keep track of rotational positions yourself then, of course, rather than just altering the rotation var of the Sprite/MovieClip, so maybe “easier” isn’t the proper word to use… But then you’d have very accurate collision testing (for the character you show), including the moving hands, and you could do localized detection (knowing which part of the body collided; for damage, allowing the body to still move if only the hand collided, etc).
Edit (excised localToGlobal stuff that isn’t useful in this case)