Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / 2D ball collision using vectors

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Feb 2004 01:12
Let me know if anyone finds any bugs in it.



"eureka" - Archimedes
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 23rd Feb 2004 01:41
No bugs here!

Even changing 'amount' to loads it still works. If I change velocity to a small number like 0.1 so I can see what's going on I notice a small overlap when two circles touch at their 'corners' but not enough to worry about. May just be way that DB draws circles.

To test it is doing 'proper' ball collisions I changed radius from 20 to 50 and it really does work.

Boo!

Login to post a reply

Server time is: 2024-05-11 05:20:31
Your offset time is: 2024-05-11 05:20:31