I have two objects and I need to make one to run towards the position of the second object +1meter more.
I cant figure this out and yes I read the vectors tutorial make me even more confused.
Anyone?
I have two objects and I need to make one to run towards the position of the second object +1meter more.
I cant figure this out and yes I read the vectors tutorial make me even more confused.
Anyone?
object o1; //Define Object to Move
object o2; //Define Target Object to Move Past
vector vDis = GetPosition(o2) - GetPosition(o1);
vDis *= (VectorMagnitude(vDis) + 1.0)/ VectorMagnitude(vDis);
AssignCommand(o1, ActionMoveToLocation(Location(GetArea(o1), GetPosition(o1) + vDis, VectorToAngle(vDis))));
thanks thats it ![]()