PDA

View Full Version : Calculation of the time to collision.



Moczulak
30th January 2014, 19:05
Hey, i have car, i would like calculate of the time to collision car with wall.
I tried to use vector but i don't know how do it this calculation.
I mean computing time to collision when the car is in motion :P

Ni3ls
30th January 2014, 20:41
if(ismoving) do bulletrace from angels of car to rest. distance check etc etc

serthy
30th January 2014, 21:57
Hey, i have car, i would like calculate of the time to collision car with wall.
Then just do it!

I tried to use vector but i don't know how do it this calculation.
...

I mean computing time to collision when the car is in motion :P
Well, if its not in motion then there will probably no collision...



Okay... CoD2 is a 9 year old game and since the first days there are quadrillions of public available mods out there. Why is noone able to just download and have a 10mins look at them?!
Also there were another quadrillion of tutorials and 'How-do-I-do-a-post'-threads! (Not to mention the multifantastillion of physics-threads on wikipedia on a simple speed calculation, teached by every 5th grade teacher)
But instead ever since there are community places to ask (all kind *cough*) of questions, there are also ones posted in the way ive complained above.

Okay, now just THINK!

you've known this since ages: SPEED = DISTANCE / TIME wth...

IzNoGoD
30th January 2014, 23:12
Please use the search function.

http://killtube.org/showthread.php?894-advanced-movegravity%28%29-and-movement-vectors
http://killtube.org/showthread.php?893-Bullettrace-and-you

kung foo man
31st January 2014, 10:02
When it's so easy, then why make such a hassle out of a question? I guess respected others is teached in the Kindergarten ^^

Serthy published his tank mod here: http://killtube.org/showthread.php?1624-DOWNLOAD-COD2-TANKs

It's a stand alone mod, so you don't need to fizzle with loose scripts around and you can just fit the variables to fit your vehicle type, then port it over into your mod (don't forget credits ofc)