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 Line intesection example

Author
Message
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 17th Aug 2003 21:56
Hi All,

Just a little bit of code (DBpro) I needed and thought I'd share.

The function returns a 1 if the lines intersect, and the intersect point is stored in intersectX# and intersectY# globals.

Might be a good start on manual collision, it is quite fast (no noticable fps hit).


Van-B
My cats breath smells of cat food.
D Man
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 18th Aug 2003 00:03
Good work!

God is real, unless declared integer.

Login to post a reply

Server time is: 2024-04-27 01:45:56
Your offset time is: 2024-04-27 01:45:56