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.

Author
Message
Philip 1337
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 13th Feb 2003 15:14
I think i have found a way of making the bullit be able to move very fast and have collision that never misses.
Philip 1337
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 13th Feb 2003 15:20
When you move the object bullit you need to move it by the objects length. But this makes the bullit go to slow.
So you need to move object bullit#,length# then check for collision and then move it again and check for collision, etc...
This has two be done about 20 times to make you bullit move at the speed of 20.
It works too.
PiratSS
22
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 13th Feb 2003 16:06
yep,

that's the way you should do it.

but instead of just making the loop 20 times, make it, so when it stops when it collides. that way you can make nice sniper effect.

Specs: Dual Amd Athlon 2Ghz(1Ghz x 2), 40GB 15000 Rpm SCSI Hard Drive, 640 Mb 266Mhz DDR, 12x8x32 CDRW, ATI Rage Fury Pro 32Mb SD Video, 17' Monitor
mimesis
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Norway
Posted: 13th Feb 2003 17:25
You are both wrong.
Bullets should be done using a ray-cast method like LineOfSight for detecting bsp + intersect object for
detecting objects. Moving the bullet a little at the time
may work if you are alone in your world, but try and make
all of you're bots using this system, thats slow!.
LineOfSight will be introduced in DBP later.
Philip 1337
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 13th Feb 2003 18:20
It seems very fast on my computer what do you mean?
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 14th Feb 2003 02:53
i got a crappy celeron 366 so i always gotta keep my code tight or my frame rate goes to pot.
The best command i found for checking collisions where an object might pass through another before you can check for collision is INTERSECT OBJECT.

u just give it a from xyz, a too xyz, and an object no. and it returns a zero if object not between two points or if the object is between the two points it returns the distance.

heres an example:



if u wanna make bullit faster then u can change speed at line 76.

This is the fastest method i found so far.
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 14th Feb 2003 14:09
sorry line 80 is wrong, replace with this:

Login to post a reply

Server time is: 2025-05-20 17:34:20
Your offset time is: 2025-05-20 17:34:20