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 / Shooting Method

Author
Message
Naztrain
16
Years of Service
User Offline
Joined: 13th Jun 2008
Location:
Posted: 13th Jun 2008 21:33
I'm just here for fun, and am planning on making a FPS or flight combat game. I only have Dark GDK, so I'm not sure if this belongs here or in the Newcomer's DBPro forum.

I don't need code examples or anything, but as far as actually shooting something: Do you point some kind of particle at the target, send it that way until there is a collision, then calculate damage from there? Or is there a simpler way of doing it? I know that particular method works (I shot a small sphere at a big sphere and made it vanish).

I've looked all over for the answer for this question, and I get the feeling that it's right under my nose somewhere, but I simply can't find it. Typing the word "shoot" in the search engine turnes up 50% of the posts on this forum.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 13th Jun 2008 22:04
I have a tank game in DBPro. In that application, I glue an invisible shell to the barrel. When I want to fire it, I use Euler rotation (xrotate, yrotate and zrotate) to orient the shell to the limb directions of the turret, and then move it to the end of the barrel, and unhide/unglue it. Then, all I do is move it and check for collision. Its a lot faster than it sounds.

Most people use some form of ray casting to get the trajectory, but that is not at all ballistic...more like a laser, really.

Login to post a reply

Server time is: 2024-11-20 13:20:33
Your offset time is: 2024-11-20 13:20:33