Posted by CogKing on March 13, 1998 at 17:29:10:
In Reply to: 2 Quick AI questions(isnt in jkspecs yet) posted by Elanthil on March 13, 1998 at 16:56:24:
> 1) if I have an AiSetMove,
> ex: AISetMovePos(r2, GetThingPos(player));
> and I DONT want the AI to push the player around (its trying to match coords),
> should I change it to: AISetMovePos(r2, GetThingPos(player))-.1;
> or should I make it: AISetMovePos(r2, GetThingPos(player)-.1);
// This should be a 0.1 length vector along the droid to player vector :
myVector = VectorScale( VectorNorm( VectorSub( GetThingPos(player), GetThingPos(r2))), 0.1);
// this should be the pos you need :
AISetMovePos(r2, VectorSub(GetThingPos(player), myVector));
or something like that... :-)
-CogKing