CRaPI - Correct Robust and Perfect API

BasicActions.TurnToPoint Method (Player, Point2D, Command)

public static void TurnToPoint(
   Player pPlayer,
   Point2D pPoint,
   out Command action
);

Parameters

pPlayer
The player
pPoint
The point to look at
action
The action command for the turn

Remarks

The player is turned so the AbsoluteBodyDirection equals the angle between the players position and the point. This means that even if the point is visible before the turn, the point could go out of view after the turn. This method just makes sure the body has the right angle towards the point.

This method does not send any command to the server, it is therefore up to the agent to execute the command on the server.

See Also

BasicActions Class | TeamYaffa.CRaPI Namespace | BasicActions.TurnToPoint Overload List | TurnToObject