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 / Raycasting demo (sniper laser)

Author
Message
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 20th Aug 2005 18:31
I saw this once in DBP. And I liked it, so I've completely redone it in DBC!



There's no media required.
If someone has ANY questions about my code, just ask.

Immunity and Annihalation makes Immunihalation...
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 20th Aug 2005 19:37 Edited at: 20th Aug 2005 19:38


sx# = object size x(1)/2
sy# = object size y(1)/2
sz# = object size z(1)/2

I suggest you change those 2's to 1's, so the player doesn't go through the wall halfway.

Anyways, really nice job.
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 21st Aug 2005 10:30
Nope, I think the problem is here:



and here:


Because I set the accuracy to 1 and radius to 1, the intersection point was on the wrong place --> I resized the static coll box -2.5 in the hope it worked. It worked, but my collision didn't.

Now it's fixed.
I have set accuracy to 0 and radius to 0.001.



Immunity and Annihalation makes Immunihalation...

Login to post a reply

Server time is: 2025-05-22 14:15:06
Your offset time is: 2025-05-22 14:15:06