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.

DarkBASIC Discussion / Using raycasting to find if the bullet hit its target

Author
Message
ChozoMufin
20
Years of Service
User Offline
Joined: 19th Apr 2005
Location: Columbus, OH
Posted: 9th Aug 2005 03:27 Edited at: 9th Aug 2005 03:30
Yeah right now I have nuclear glory and it works great and i'm using it for my bullet hitting stuff. i set up a raycast with it and made it so that it casts a ray 10 units ahead of it and if it intersects something, the bullet hides and the object takes damage. but something's not working and i don't know what it is. if you know what i did wrong, or you have a better way to do this entirely, please tell me.

here is my code:


the bullet array is for the rapid fire system of my rts, so the first thing in the array is the unit, the second is the bullet number (each unit has 9 bullets to fire) and the third is the life of the bullet. please help.

Your Head A-Splode
NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 9th Aug 2005 07:01 Edited at: 9th Aug 2005 07:02
ChozoMufin,

What is not working correctly? Better yet, what is not happening, that is supposed to be happening? If you know there is a problem, then you will be able to explain this.


+NanoBrain+
ChozoMufin
20
Years of Service
User Offline
Joined: 19th Apr 2005
Location: Columbus, OH
Posted: 19th Aug 2005 20:16
right. the bullets just go right through the people, and this was supposed to make it so that it would hit the person and damage it.

Your Head A-Splode

Login to post a reply

Server time is: 2025-05-22 13:31:36
Your offset time is: 2025-05-22 13:31:36