Getting XY in front of an object.
#3

That is because your angles should be the same value for both the players facing angle try this.

pawn Code:
stock bool:GetPosInFrontOfPoint(&Float:OutputX, &Float:OutputY, Float:Angle, Float:Distance)
{
    if(!Distance) return false;
    OutputX += floatmul(Distance, floatsin(-Angle, degrees));
    OutputY += floatmul(Distance, floatcos(-Angle, degrees));
    return true;
}
Is a bad idea to do it the way your trying to do it as you might need the same function it will be easier to update the object position with less copy paste code. Does this happen to be for a map editor ?
Reply


Messages In This Thread
Getting XY in front of an object. - by kadaradam - 21.01.2014, 17:20
Re: Getting XY in front of an object. - by thefatshizms - 21.01.2014, 17:29
Re: Getting XY in front of an object. - by Pottus - 21.01.2014, 17:38
Re: Getting XY in front of an object. - by kadaradam - 23.01.2014, 10:36

Forum Jump:


Users browsing this thread: 1 Guest(s)