Thread: collision
View Single Post
collision
Old
walleyewilly
Junior Member
 
walleyewilly's Avatar
 
Status: Offline
Posts: 9
Join Date: Mar 2012
Location: youngstown
Default collision - 05-08-2012, 01:27 PM

Here's a collision detection method I've created for a project I'm working on. I apologize if someone else has already posted this but I came up with it the other night and wasn't aware of it in the forums. Anyhow it's based on a line segment theory. If there is a line segment AC and there is a point, B, anywhere along line AC then A distance to C is = to (A distance to B) + (B distance to C). Where points A and C are the dummy objects I'm using in the program and B is the movable object. This collision detection should work for any polygon where you cannot use the center for collision detection. There must be a thickness to the center of an object because I had to modify the equation to account for it. I had to use a greater than or equal to with that thickness in it. If anyone has anything that can improve it please do. Willy
Attached Files
File Type: a2w collision.a2w (209.3 KB, 41 views)
   
Reply With Quote