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.

Dark GDK / collition of two objects

Author
Message
tvzen
14
Years of Service
User Offline
Joined: 3rd Dec 2009
Location:
Posted: 12th Feb 2010 02:49
hey,i think i found a easier way,but how do you get it to detect to not collision over all,but if one other object(i.e bullet) hit it?please be a if statement...
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 12th Feb 2010 07:59 Edited at: 12th Feb 2010 08:02
you mean, how to know if it is not colliding with any of your objects?


here, X1 is the ID of the lowest enemy's ID, X2 is the highest

colliding will get the ID of the object that is colliding with your bullet, if no collision is happening it will be 0.

here, i recommend using vectors, you can read about them on the net ( cplusplus.com maybe ), if you want a code with vectors:



hope that helps

tvzen
14
Years of Service
User Offline
Joined: 3rd Dec 2009
Location:
Posted: 12th Feb 2010 16:32
k,thanks,found what i need

Login to post a reply

Server time is: 2024-10-05 17:29:17
Your offset time is: 2024-10-05 17:29:17