Agent.UpdateVelocityIndicators C# (CSharp) Method

UpdateVelocityIndicators() private method

private UpdateVelocityIndicators ( Vector3 desiredVelocity, Vector3 forwardVelocity ) : void
desiredVelocity Vector3
forwardVelocity Vector3
return void
    private void UpdateVelocityIndicators(Vector3 desiredVelocity, Vector3 forwardVelocity)
    {
        // Rotate the desired velocity indicator to match the desired velocity.
        if (desiredVelocity.magnitude > 0.00001) {
            this.desiredIndicator.rotation = Quaternion.LookRotation (desiredVelocity.normalized);
        }

        // Rotate the forward velocity indicator to match the current velocity.
        if (forwardVelocity.magnitude > 0.00001) {
            this.forwardIndicator.rotation = Quaternion.LookRotation (forwardVelocity.normalized);
        }
    }