Cogking..where does the myvector go? cog or ai?


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

Posted by Elanthil on March 14, 1998 at 04:09:27:

In Reply to: Short ? Groan... :-) posted by CogKing on March 13, 1998 at 17:29:10:

> > 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




Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]