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 / player bullet???

Author
Message
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 15th Apr 2008 12:01
iam tired from searching in forum for player bullet using DarkPhysics.
i tried some codes but not real for example dbMoveObject(the bullet very slow).plaese can anyone help me or give me ideas or alternatives for making this thing.sorry for bad english
RancidRat
16
Years of Service
User Offline
Joined: 19th Feb 2008
Location:
Posted: 15th Apr 2008 15:15
What exactly is your bullet suppose to do? Is it an fps? are you just wanting the player to be able to shoot a bullet in a cetain direction?
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 16th Apr 2008 09:10 Edited at: 16th Apr 2008 10:05
yes i mean fps bullets,for example whats the techniques and the methods that used in call of duty or igi or fpsc creator also
for shooting bullets is it moving object to hit the target or make object too Far away player object and make mesh between them and anything corresponding between the player object and the far object become the target or ............????i hope the answer for me
RancidRat
16
Years of Service
User Offline
Joined: 19th Feb 2008
Location:
Posted: 16th Apr 2008 17:50 Edited at: 16th Apr 2008 17:57
Well, im a noob at this, but Im busy with an FPS and my bullets work well and I dont have dark physics.

For rockets and projectile kind of weapons:

When the player shoots, I create the rocket(3d Object)at the player's coordinates and then set it to the player's orientation.
then I simply use dbMoveObject(with a high felocity). Or I make a timer and keep moving the rocket while the timer is running.

While it is moving I check if it is colliding with anything. If it is then I remove the rocket and creat an explosion (3d Object) at its coordinates. The Explosion is then what causes the damage if it collides with an enemy


For hand guns and chaingun's:

With this kind of thing you dont need to see the bullet.
I've downloaded the SC_Collision thing, it is very helpful. I use a ray colistion thing.

Basically, When the player shoots, I send out an invisible sphere,
again, using dbMoveObject(). This sphere then some how checks if it is hitting anything (a wall or person) along the way. It then projects another object to the point where it hit something. THAT Object can be the spark or "dust hit" where your bullet hits.

so, lets say my bullet spark is object 501, Object 4 is my invisible checker, and Object 2 is the player / camera. then the code is something like this:


I did not write all this code, I just copied it from the demo and put my object numbers in and it works great. .

Dunno if this is making any sense, probably sounds stupid and not the best way to do it, but im even willing to give you a little demo just to prove how well it works
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 17th Apr 2008 05:26
thanks RancidRat.....
i will try it.
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 17th Apr 2008 10:08
thanks RancidRat again.
its work good

Login to post a reply

Server time is: 2024-11-17 10:17:01
Your offset time is: 2024-11-17 10:17:01