Calculating Shadowstep coordinates

03/09/2012 22:01 Rauloco#1
Hi everyone, i'm just wondering how could i make the calculations of shadowstep, i mean, shadowstep gets the target coords and it's positioned 5 or 10 (idk) meters behind him.

So, getting the X,Y,Z,O coordinates of my target how shall i calculate the new coords from behin the target.

Even if you have the SS source link it to me please. =S.
03/11/2012 14:10 Frosttall#2
Simple trigonometrical maths:

newX = (float)(Convert.ToDouble(TargetX) + (-5 * Math.Cos(TargetFacing)));
newY = (float)(Convert.ToDouble(TargetY) + (-5 * Math.Sin(TargetFacing)));