Hello! I'm trying to make a new game with using improved collision detection and so, i need to use math. Im only in 6th class and i don't know how to done:
I have 2 segments and i know x and y coordinates of their start and end. I need a function (scratch-program) that shows 1 if 1 of mine segments traverse another one or 0 otherwise.
Can any1 write it for me, please?
Offline
Here is a discussion that talks about this problem and the math required
http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
Offline