bool UpdateRotation { get; set; }

robot_2Generated
code_blocksInput

Description

The UpdateRotation property of the NavMeshAgent class determines whether the GameObject's rotation is automatically updated to face the direction it is moving. This property is not configurable to allow for specific custom behavior, so it is recommended to disable this property and handle rotation manually if specific behavior is required.

Usage

To use the UpdateRotation property, simply set it to true or false depending on whether you want the GameObject to automatically face the direction it is moving.

Example usage:

NavMeshAgent agent = new NavMeshAgent();
agent.UpdateRotation = false; // Disable automatic rotation

Example

NavMeshAgent agent = new NavMeshAgent();
agent.UpdateRotation = false; // Disable automatic rotation