LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-19-2005, 07:25 PM
particleMan particleMan is offline
Registered User
 
Join Date: Apr 2005
Posts: 3
Rep Power: 0
particleMan is on a distinguished road
Fliping axis on collision

Hey all, been having this collision issue and i just cant figure out how to fix it. I have a ship the flies around and runs into square walls. Its collision is detected by its bounding box.

The ship's movment rate is stored as velocityX and velocityY, and then the x and y position are updated after the collision testing.

What i want to do is, depending on which side of the ship's bounding box collides with a wall, i want the perpendicular axis to flip. For example, if the top of the ship's bounding box hits a wall, velocityX *= -1.

The one issue i cant fix is if just one corner of the bounding box collides with the wall. For example, if the top left corner hits a wall from above, the check will go through, but what if the wall is to the left, the first check will still go through...

Anyone know of a tutorial that actually has the fliping of the axis? ...any tutorial i've looked for only gave a bollean value of collision, which is not exactly what I need.

Any help would be greatly appreciated as It's for a school project.
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Slider to drag another slider on collision As2 Kills Actionscript 2.0 1 12-01-2009 08:09 AM
Need some help with collision detecting Hamishman General Flash 2 02-13-2009 01:45 AM
Advanced rectangle collision prisma Game Programming 8 08-22-2008 03:44 PM
Defining Y Axis xer0derm Flash 8 1 01-29-2007 06:41 AM
Frame Independent Collision Detection Canstein33 Flash MX ActionScript 2 04-18-2003 06:10 PM




All times are GMT. The time now is 01:28 PM.