Object hittesting

How do I make rectangles hittestable from all sides.
Currently I can only get the top side to bounce off, but I want to be able to bounce from 4 sides.
[import]uid: 360 topic_id: 198 reply_id: 300198[/import]

glenn

want to send me some code to see what you are doing?

c. [import]uid: 24 topic_id: 198 reply_id: 245[/import]

So I figured out how to detect collision from 4 sides on a rectangle.
But if I rotate the rectangle to say 45 degrees, the bounds of the object stay the same and only the visible parts of the rectangle rotate. Do I have to write a algorithm to detect that kind of collision, or is there an easier way? [import]uid: 360 topic_id: 198 reply_id: 300[/import]

Hi,

Is there any sample, or collision module available for handling sprites ?

Could you possibly post your example Glenn in the samples topic of the forum ?

Cheers,
Freshworks [import]uid: 2734 topic_id: 198 reply_id: 404[/import]