Jump to content
Sign in to follow this  

Need help with rotation calculation

Recommended Posts


Hello, my name is Dexter, and I really need some help.

I am working on a program, that will be able to take two coords from a 3D game, and calculate how far point A is from point B, and calculate which direction the object on point A needs to be facing(in degrees) to get to point B. It am making two copies of this program, one in autoit, and one in C++. I am not very knowlegable on how to make this happen. I know there is some formula for both of these tasks, however, I'm clueless.

I will be reading the X and Y from the memory(I know how to do this) and also reading the Z rotation. The program will check current possition, check target location, calculate how far the target location is, calculate which direction is needed to be facing the target location, rotate your in-game character to this angle, then walk until your character is at a reasonable range. I know how to do everything exept perform the calculations. If someone knows the formulas, I would greatful if you shared. Thx.


Share this post

Link to post
Share on other sites


[how to write a AI3 robot to twit other players?]

<scnr> nice to see that trignometric nesciense is the stumbling block to prevent you from writing such code </scnr>

Never mind, Rudi..

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.