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
[...]
Code: Select all
if ( Normal(X) dot Normal(LocalCam.location - Anims[iTransfer].Animated.location) >= 0.7 )
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
https://forums.beyondunreal.com/threads ... do.102776/
"Weapon of Destruction"
http://www.oldunreal.com/wiki/index.php ... gine.Actor
"Cross Product And Dot Product: Visual Explanation"
https://www.youtube.com/watch?v=h0NJK4mEIJU