Solved find pitch and yaw...

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat


Full Member
Apr 23, 2017
will this function I made find the correct pitch and yaw?

void CalcAngles(float*myLoc,float*enemyLoc) {
	//(2,4,3) (-2,8,2)
	float slope = (enemyLoc[1] - myLoc[1]) / (enemyLoc[0] - myLoc[0]);
	float distance = sqrt(pow(float(enemyLoc[1] - myLoc[1]), 2.0f)
		+ pow(float(enemyLoc[0] - myLoc[0]), 2.0f)
		+ pow(float(enemyLoc[2] - myLoc[2]), 2.0f));
	float c = distance;
	float a = c / (sqrt(pow(float(slope), 2.0f) + 1));
	float Pitch = (acos(a / c)) * 180.0f / PI;
	float Yaw = 180 - 90 - Pitch;

	cout <<(float) Pitch << endl;
	cout << (float) Yaw << endl;
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