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 / Help with seeing if an imaginary line coming from the barrel of a gun is hitting something

Author
Message
negi
8
Years of Service
User Offline
Joined: 16th Feb 2011
Location:
Posted: 6th May 2012 06:49
I am trying to make my first fps game, and have been having problems with how to tell if you’re actually shooting something/someone by seeing if it’s interacting with the line and putting an image of a gunshot or something there. Can someone please tell me how to do this a code example would me much appreciated.

Thanks for any help

All is revealed with time.
Zotoaster
14
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 6th May 2012 15:42
Get Sparky's DLL, then use this:

DWORD coll = SC_IntersectObject(objno, oldposx, oldposy, oldposz, newposx, newposy, newposz, exclude)

I believe that's the syntax for it. The docs should explain better.

"everyone forgets a semi-colon sometimes." - Phaelax
negi
8
Years of Service
User Offline
Joined: 16th Feb 2011
Location:
Posted: 14th May 2012 07:24
Cool thanks

All is revealed with time.

Login to post a reply

Server time is: 2019-11-17 15:31:15
Your offset time is: 2019-11-17 15:31:15