Graphics Collsion Detection
- Posted by Ad Rienks <Ad_Rienks at COMPUSERVE.COM> Jul 09, 1997
- 808 views
Piotr Dubla asked: >Is there anyone out there who knows what the best collision detection >method so my guy doesn't walk through object I have on the screen . I us= e >this >if key =3D 333 and y > 1 and x < 245 and x 1=3D 123 and y !=3D 123 and x= !=3D 124 >and y !=3D 125 and x !=3D etc. etc etc >There must be a beter way >Piotr Dubla (a.k.a Mr. Gibbles) You can use find() to find out if some values of a variable are the ones you are looking for. I.e. if find(x, {123, 124, 125, ....}) then dothis or if not find(x, {180, 185, 192, ....}) then dothat. Hope this helps a bit! Ad Rienks