I need the AI NavMesh Agent to walk backwards for a couple meters when too close to the player while still facing the player.
I have read in the following page that its better to use SetCharacterMovementInput & SetCharacterDeltaYawRotation to move the AI:
Something like this:
1) Is the above used alone or it has to be coupled with setting the destination as well as such:
2) What does the range of values for horizontal and forward movement do (-1 to 1)?
3) Will these actions sync over the network using the Pun Addon?
Thanks
I have read in the following page that its better to use SetCharacterMovementInput & SetCharacterDeltaYawRotation to move the AI:
Artificial Intelligence (AI) - Opsive
The Ultimate Character Controller is focused on being a great character controller so it does not include any built-in AI implementations. AI is an extremely . . .
opsive.com
Something like this:
Code:
KinematicObjectManager.SetCharacterMovementInput(_character.KinematicObjectIndex, 0, 1);
KinematicObjectManager.SetCharacterDeltaYawRotation(_character.KinematicObjectIndex, 1);
1) Is the above used alone or it has to be coupled with setting the destination as well as such:
Code:
agent.destination = player.transform.position;
2) What does the range of values for horizontal and forward movement do (-1 to 1)?
3) Will these actions sync over the network using the Pun Addon?
Thanks