Alice Community collision

 collision
walleyewilly
Junior Member

Status: Offline
Posts: 9
Join Date: Mar 2012
Location: youngstown
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
 collision.a2w (209.3 KB, 41 views)

 Tags collision, detection

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge