[HLF]Southclaw
Unregistered
Quote:
Originally Posted by Joe Staff
Not sure if already posted, but here are 2 functions/formulas that I direly needed.
pawn Code:
#define PI 3.14159265 stock Float:ToRadian(Float:Degrees)return Degrees*(PI/180); //This was set for On Foot Recording Files usage, maybe be different when used with something else stock EulerToQuaternion(Float:angle,&Float:w,&Float:x,&Float:y,&Float:z) //Angle = Z rotation { new Float:c1,Float:c2,Float:c3,Float:s1,Float:s2,Float:s3; c1=floatcos(0.0); //"Heading" -- Just guessing, but I think X rotation goes here c2=floatcos(ToRadian(angle)/2); //"Attitude" -- Definitely Z c3=floatcos(0.0); //"Bank" -- Possibly Y rotation s1=floatsin(0.0); s2=floatsin(ToRadian(angle)/2); s3=floatsin(0.0); w=(c1*c2*c3)-(s1*s2*s3); x=(s1*s2*c3)+(c1*c2*s3); y=(s1*c2*c3)+(c1*s2*s3); z=(c1*s2*c3)-(s1*c2*s3); }
|
I'm trying to learn about Quaternions my brain finds it about as difficult as trying to percept an extra dimension!
I understand there's an extra "rotation dimension" to stop "gimbal lock" but what is the 'w' or "scalar" parameter.
Is there any way I can make a visual representation in SA:MP to help me understand these damn things!?
Posts: 3,793
Threads: 196
Joined: Jan 2010
Reputation:
0
[ame]http://www.youtube.com/watch?v=Z85Pt8ImcFE[/ame]
And car warp makes cars rain... They teleport to the sky then drop (in bundles) then kill you via explosions or just collision.
NOT MY VIDEO!
Posts: 3,793
Threads: 196
Joined: Jan 2010
Reputation:
0
Yeah, you are pretty much wrong because I've tested it and it does the same thing...
SNIPPET UPDATED!
Posts: 1,336
Threads: 30
Joined: Aug 2010
Reputation:
0
car warping is really annoying :\ , makes alot of several lags to ppl , some time i noticed it bug them up
thanks you Lorenc
Posts: 663
Threads: 42
Joined: May 2009
Reputation:
0
Lorenc_ maybe you should detect if the vehicle's ID is differant to the last vehicle before you ban as an extra security measure.
Posts: 3,793
Threads: 196
Joined: Jan 2010
Reputation:
0
That's optional, I doubt it'll do a difference lol.
Posts: 28
Threads: 7
Joined: May 2012
Reputation:
0
[quote=Pizzy;1975220]I made this around 2 weeks ago and posted it in the filterscripts section, however it got removed for no specific reason.
nvm
Posts: 6,084
Threads: 231
Joined: Apr 2010
Reputation:
0
hum, I think that create (500 x 3) variablesfor just save the position of a player is a waste, for this reason i advise PVARS (but this is an opinion). Furthermore, if you notice, I have implemented this in my anti hacking (and it required the reporting of "script x script").
But you're right. PVARS are slower