1. Graphics Collsion Detection

------=_NextPart_000_01BC8C62.F89C2E80

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 use
this

if key = 333 and y > 1 and x < 245 and x 1= 123 and y != 123 and x != 124
and y != 125 and x != etc. etc etc

There must be a beter way


Piotr Dubla (a.k.a Mr. Gibbles)



------=_NextPart_000_01BC8C62.F89C2E80
Content-Transfer-Encoding: quoted-printable

<html><head></head><BODY bgcolor=3D"#FFFFFF"><p><font size=3D2 =
color=3D"#000000" face=3D"Arial">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 use this<br><br>if key =3D 333 and y =
&gt; 1 and x &lt; 245 and x 1=3D 123 and y !=3D 123 and x !=3D 124 and y =
!=3D 125 and x !=3D etc. etc etc<br><br>There must be a beter =
way<br><br><br>Piotr Dubla (a.k.a Mr. Gibbles)<br><br><br><br></p>
------=_NextPart_000_01BC8C62.F89C2E80--

new topic     » topic index » view message » categorize

2. Graphics Collsion Detection

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu