Solved GTA Online View Angles Yaw & Pitch Confused Calc Angle Math

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Praxeus

Jr.Coder
Full Member
Nobleman
Sep 12, 2012
48
408
1
So in most games the mouse coords x & y (Yaw & Pitch) if i go up its 90 , if i look down its -90 if left to right 0 - 360 .

In GTA however view angles are like so if i look up it goes 0.9random float numbers , then if i go down its - 0.9 random float numbers and the same goes for left and right? So i am confused can someone explain ?

These are the First Person View Angles if you wondering

www.puu.sh/rMS6V/d7334aa74b.png example it starts at 44 if i change that to like 0.9 it moves up if i make it 0.0 it centers it , if i make it -0.9 moves down

So my guess is they using Radians so i would need
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,074
78,998
2,371
Praxeus that is called a radian

You can either use codenz that calculates angles in radians or you can convert to degrees and then use your regular functions.

Here's some conversion functions for ya:
C++:
float RadianToDegree(float radian)
{
	return radian * (180/pi);
}

float DegreeToRadian(float degree)
{
	return degree * (pi/180);
	
}

vec3 RadianToDegree(vec3 radians)
{
	vec3 degrees;
	degrees.x = radians.x * (180/pi);
	degrees.y = radians.y * (180/pi);
	degrees.z = radians.z * (180/pi);
	return degrees;
}

vec3 DegreeToRadian(vec3 degrees)
{
	vec3 radians;
	radians.x = degrees.x * (pi/180)
	radians.y = degrees.y * (pi/180);
	radians.z = degrees.z * (pi/180);
	return radians;
}
 

Praxeus

Jr.Coder
Full Member
Nobleman
Sep 12, 2012
48
408
1
Rake;45159 said:
Praxeus that is called a radian

You can either use codenz that calculates angles in radians or you can convert to degrees and then use your regular functions.

Here's some conversion functions for ya:
C++:
float RadianToDegree(float radian)
{
	return radian * (180/pi);
}

float DegreeToRadian(float degree)
{
	return degree * (pi/180);
	
}

vec3 RadianToDegree(vec3 radians)
{
	vec3 degrees;
	degrees.x = radians.x * (180/pi);
	degrees.y = radians.y * (180/pi);
	degrees.z = radians.z * (180/pi);
	return degrees;
}

vec3 DegreeToRadian(vec3 degrees)
{
	vec3 radians;
	radians.x = degrees.x * (pi/180)
	radians.y = degrees.y * (pi/180);
	radians.z = degrees.z * (pi/180);
	return radians;
}

Dude you are amazing :)
 

cNoEvil

Coder
Full Member
Nobleman
Jun 6, 2016
159
888
1
like bruh how does math work?

i goes as far as geometry and that's it. fuck trig dude.

geometry dude (dist formula, midpoint formula, (tan,cos,sin), triangles, area, perimeter, transformations) other stuff i've can't think of of the top my head.

fuck trig dude triangles dude fuck dude geometry dude.
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,074
78,998
2,371
cNoEvil :lol::lol::lol:

I've never been interested about trigonometry/geometry I just learn/use what I need to make the hacks. Usually after I write the code I forget why it works because I don't need to know it anymore, I have functions that know it for me and can abstract it away
 

cNoEvil

Coder
Full Member
Nobleman
Jun 6, 2016
159
888
1
Jesus fucking Christ, i don't even remember getting on GH yesterday i've really fallen off the wagon this week.

i like geometry buts that all i care for in math however due to the nature of how math works i can't just like geometry because to be able to understand and do geometry one must 1st learn algebra 1 & 2
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods