CRaPI - Correct Robust and Perfect API

BasicActions.LookAtObject Method (Player, FieldObject)

public static Command LookAtObject(
   Player pPlayer,
   FieldObject pObject
);

Parameters

pPlayer
The player.
pObject
The object to look at.

Return Value

The action command for the turn-neck.

Remarks

It is not possible to turn the neck, if the angle to the point is more than MaxNeckAngle or less than MinNeckAngle relative the players body direction

If it is not possible to turn the neck sufficiently (looking directly at the object), the turn_neck will be as good as possible, i.e. the HeadAngle will be either MaxNeckAngle or MinNeckAngle after the command.

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.LookAtObject Overload List | LookAtPoint