tl;dr My math compiles, but am I doing it right?

I can grab an Actor's facing direction with GetAxes():

- Code: Select all
`struct AnimRegister`

{

var Actor Animated; // Actor in question

[...]

};

var private array<AnimRegister> Anims;

- Code: Select all
`function X()`

{

local Vector X,Y,Z; // These are used as an output storage for GetAxes

if ( Anims[iTransfer].Animation != none )

{

GetAxes( Anims[iTransfer].Animated.Rotation, X, Y, Z );

// Input actor, output X/Y/Z respectively

[...]

From there, I want to get the resulting angle provided by dot calculation. In this example, X is normalized which according to Wiki(s) brings it to a value between 1 and -1, which if I'm understanding this correctly will help in determining the angle I am trying to calculate. Then get the normal result of the subtraction of two actor locations which I believe provides me with a straight line between the actors, or at least the magnitude of the line that goes through them. So now I have two resulting numbers, both between 1 and -1 depending on inserted values.

- Code: Select all
`if ( Normal(X) dot Normal(LocalCam.location - Anims[iTransfer].Animated.location) >= 0.7 )`

So the code above is supposed to figure out the angle provided, and if the value of the cosine is greater than or equal to 0.7, then something happens. Is this correct so far? The math itself compiles, I'll post links I used for research.

Also how the FRICK do I use Abs()? I can't seem to find any info on it and I am going to need it for a later part.

**Spoiler:**show

"What Does GetAxes() Do"

https://forums.beyondunreal.com/threads/what-does-getaxes-do.102776/

"Weapon of Destruction"

http://www.oldunreal.com/wiki/index.php?title=Weapon_of_destruction#Engine.Actor

"Cross Product And Dot Product: Visual Explanation"

https://www.youtube.com/watch?v=h0NJK4mEIJU