Jump to content
  • Advertisement
Sign in to follow this  

Help with flash collision detection. Rotating and hiting at the same time

This topic is 3215 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, Thank you everyone for the help about my previous problem with flash collision detection. The problem i am currently on is a bit more difficult. What i want to do is rotate the object and have it collide. 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 wont 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 thanks for reading and any help you may give

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!