What I want to do is rotate the object and have its collision box rotate with it. I want the rectangle to rotate so it looks like a diamond and have one of its sides hit the object in a per pixel fashion. From my reading of some books and websites it seems that normal rectangular collision and hitTestObject collision won't do for this problem. I have searched high and low and want to know if anyone has a solution to hit detection with moving and rotating objects. Here is my current collision code with rectangles
colboxrect = colbox1.getRect(this);
robotrect = robot1.getRect(this);
if(robotrect.intersects(colboxrect))
{
velocity *=-1;
}
What I want to happen is when it collides the robot will bounce off of the box. It works but only when it hits it head on. I want it to rotate and be able to hit. I am looking for the flash equivalent of this basically. http://creators.xna.com/en-US/tutorial/collision2dperpixeltransformed
How can I accomplish this?