[help] ghostmode math

Posts 115 of 19 · Page 1 of 2
[help] ghostmode math
yes im looking for the math that 1-key ghostmode uses. i have a function for it set up like this:
Code:
void forward( float distance, float yaw, float pitch, int max_yaw, int max_pitch )
its going to be for any fps, thats why i have the int max_yaw and max_pitch. thanks in advance!
sin cos
there you go
i have a feeling this requires a lot of thinking...
Quote Originally Posted by kibbles18 View Post
i have a feeling this requires a lot of thinking...
learn math?
Quote Originally Posted by kibbles18 View Post
wehr d0 i dl mat h?
ummm what
It's uber easy it's simple trig.
Quote Originally Posted by Crash View Post
It's uber easy it's simple trig.
yarr crash for CA minion
Quote Originally Posted by NOOB View Post


yarr crash for CA minion
nuuu i nid NOOB's seal OF approvel
Code:
if (forward || backward)
			{
				float sign = (forward ? 1.0f : -1.0f);
				Posx += sign * 20.0f * sinf(Yaw);
				Posy += sign * 20.0f * sinf(-Pitch);
				Posz += sign * 20.0f * cosf(Yaw);
			}
Just a sample
Quote Originally Posted by _Fk127_ View Post
Just a sample
if that works i will piss my pants
Quote Originally Posted by kibbles18 View Post
if that works i will piss my pants
lol thats not the whole thing
what header is sinf and cosf found in?
yeah i know its not the whole thing. i just need to add my X Y Z pointers in place of the posx posy posz, and define forward/backward
Quote Originally Posted by kibbles18 View Post
what header is sinf and cosf found in?
A LITTLE PART OF ME JUST DIED INSIDE.
Posts 115 of 19 · Page 1 of 2

Post a Reply

Tags for this Thread

None

Need help?