Alright, so I have this function here by port.
function Player::getLOSPoint(%this, %mask, %dist)
{
%eyePoint = %this.getEyePoint();
%eyeVector = %this.getEyeVector();
%endPoint = vectorAdd(%eyePoint, vectorScale(%eyeVector, %dist));
%ray = containerRayCast(%eyePoint, %endPoint, %mask, %this);
if (%ray)
{
return getWords(%ray, 1, 3);
}
return %endPoint;
}
It works just dandy, but the problem is that getEyeVector(); takes freelooking into account as well, so if I use this for weapons I could just hold freelook and fire backwards.
Is there any alternative to getEyeVector(); that ignores freelook?
By the way, before you ask, I did try getWords(getForwardVector(), 0, 1) SPC getWord(getEyeVector(), 2); but for some dumb ass reason getForwardVector can't go below or above a certain angle.