Free fall - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Free fall (
/showthread.php?tid=121834)
Free fall -
potato - 18.01.2010
Hi!
In physics there is a constant that represents the acceleration of a body when it's free falling.
Here it has a symbol 'g' and a value aprox. 9.8 m/s/s, but what's this value in GTA San Andreas?
This may seem funny, but after viewing object movements I noticed that objects don't fall like they should.
Re: Free fall -
Joe Staff - 18.01.2010
I think it's 8m/s/s. I got this number from the base gravity, which is 0.008 which I believe is actually the rate of downwards acceleration per millisecond.
Re: Free fall -
potato - 18.01.2010
Thanks! Hope the bombs will drop right now
Re: Free fall -
mansonh - 19.01.2010
its not exactly meters but yes i think its 8 samp-units/s/s.
You could easily write a script to test this.(below, not tested) Will give you samp-units/s/s.
You should also have a terminal velocity otherwise you will end up with a really fast object.
pawn Код:
new playerSpeed[MAX_PLAYERS];
public OnFilterScriptInit()
{
SetTimer("AccelerationTimer", 1000, 1);
}
public ()
{
new Float:Xnull, Float:Ynull, Float:Zspeed;
for(new playerid=0; playerid<MAX_PLAYERS; playerid++)
{
GetPlayerVelocity(playerid, Xnull, Ynull, Zspeed);
new msg[128];
format(msg, sizeOf(msg), "Acceleration: %f/s/s", Zspeed-playerSpeed[playerid]);
SendClientMessage(playerid, 0xAAAAAAAA, msg);
playerSpeed[playerid] = Zspeed;
}
}
Re: Free fall -
Gamer_Z - 19.01.2010
gta units are in meters.. use my measurement system to check it ;x
if did ex a big stunt, i noticed the amount of feet then i compared the gta units and converted feet to meters and gta units == meters..