Hey guys,
I'd like to ask something about a calculation which I was thinking of.
I got 2 points, 1 point is the point where I am and the other point is the point to which I want to move. But first I have to look towards this point ( face angle ). It is about a game, called warhammer.
I heared, that there is a possibility to calculate the angle.
Let's say the point is (which I was reading out CE):
x1 = 27802.375;
y1 = 17086.75;
x2 = 27520;
y2 = 18296.4375;
I know how to calculate the distance between two points, it must be something like.
X = x2 - x1;
Y = y2 - y1;
Distance = Math.sqrt(pow(X, 2) + pow(Y, 2));
Angle:
Angle = Math.Acos(-Y, Distance) / 6.28 * 360;
But I'm not sure and maybe someone has another solution to find out the face angle
best regards
I'd like to ask something about a calculation which I was thinking of.
I got 2 points, 1 point is the point where I am and the other point is the point to which I want to move. But first I have to look towards this point ( face angle ). It is about a game, called warhammer.
I heared, that there is a possibility to calculate the angle.
Let's say the point is (which I was reading out CE):
x1 = 27802.375;
y1 = 17086.75;
x2 = 27520;
y2 = 18296.4375;
I know how to calculate the distance between two points, it must be something like.
X = x2 - x1;
Y = y2 - y1;
Distance = Math.sqrt(pow(X, 2) + pow(Y, 2));
Angle:
Angle = Math.Acos(-Y, Distance) / 6.28 * 360;
But I'm not sure and maybe someone has another solution to find out the face angle
best regards