Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
That is a very good link, I think that really put the baby to bed Cypog I was getting pretty much all the same values.
Posts: 484
Threads: 10
Joined: Jul 2012
Reputation:
0
Well I've just read 1st page and the last page, so please don't complain too much for this post.
Well I was working on the speed system for my server and wanted to make the most reaslistic speed. With realistic I mean speed that are compared with the car performance in game. So to do this I basically used GetVehicleVelocity to see the highest number I could get on a car. Then I went into "handling.cfg" on GTA file to see the top speed of that car. I used infernus for this.
So all I had to do was take the speed from getvehiclespeed (had to do ofcourse the square root of the sum of the squares of x y and z speed) *240 (in files top speed of infernus) / 1.229576 (the top speed I could get with getvehicle speed for infernus).
The values are pretty accurate in my opinion. I tested with Coach which reached a top speed of 170 km/h, though in files it only reaches 160. So I think I failed to reach top speed with infernus in game, so if you're going to use this make your own calculations with another slower vehicle, that way you'll have more accurate results.
Thanks for reading, sorry for bumping and sorry for not reading the whole thread but I was lazy for it and wanted to share this. kthxbai
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
It's not going to make much of a difference and will never be accurate 100 percent but 179 should be pretty good.
Posts: 50
Threads: 0
Joined: Feb 2014
Reputation:
0
Alright guys, I think the magic number is ~196.72 (for KM/H), let me explain you how I found it:
- I assumed that the coordinates system in GTA is equal to 1 meter
- I calculated the distance (in GTA coords) travelled in 1 second by an Infernus, which resulted in ~67 coords/s = ~240 km/h (the same in handling.cfg ??)
- Now I compared the speed traveled to the vector that the GetVehicleVelocity gave me (On a single axis) and was about 1.22
Ta da! Now just make a proportion: 1,22 : 240 = 1 : x
x = 196.72
Prove it yourself if you want, the vehicles seems pretty much to respect their top speeds declared in handling.cfg file.
EDIT: Ok this value gives an accurate result only for few high speed vehicles, but I think this is the value that "feels" better the speed.
Vehicles that work perfectly with this value:
- Infernus
- Hydra
- All the bikes/motorcycles
- All the boats
Note: other vehicles seems to have -20 or +20 km/h difference to their handling.cfg top speed
Posts: 138
Threads: 26
Joined: Mar 2014
Reputation:
0
09.04.2014, 09:36
(
Last edited by VerticalGaming; 09/04/2014 at 11:55 AM.
)
This is mine.. Works perfectly for me.
Turismo: 204km/h, Infernus: 209km/h.
Bus: 120km/h etc..
Read NEXT COMMENT FOR CODE. CHANGED.
Posts: 125
Threads: 10
Joined: May 2011
Reputation:
0
I made a quick test with human speed.
I run for one minute, with running animation, so constant speed that I assume it's 10kph (Normal human running speed). After finishing, the distance run was 19.85 in SAMP units.
We multiply for 60 to get the samp units per hour and we get that human speed in San Andreas Units is:
1191 per hour, let say 1200.
So 1200 uph = 10 kph, so 1km = 120 u
How to convert this to the 'magic' number to see if speeds are logical or not?
Posts: 2,938
Threads: 162
Joined: May 2010
So, Pottus, did you only test this on a highway?
Do you know what is a GTA:SA's highway limiter?
Posts: 2,938
Threads: 162
Joined: May 2010
Yes it's on gant bridge.
It happens on the strip. It's supposed to be on almost all highways.
Hence 'Highway limiter'. I'm just curious, maybe redo your tests on an airport or something because if the highway limiter affected your tests then your results might be off.
Posts: 2,938
Threads: 162
Joined: May 2010
Ok, just trying to help because I know hardly anyone here realizes that their is an actual highway limiter.
Posts: 2,938
Threads: 162
Joined: May 2010