Thanks for your answer. I just add it to another script but it need the RVOExampleAgent (modified or not) to work right?
This is my prefab.
The "MyAgent" script is the RVOExampleAgent modified and where I added your script part.
The NPCCharacter manage the animation
The NPCBehavior inherit from RichAI and is used to move the character to a target.
It's actually work well but when my AI avoid the character, their RVOController.velocity.magnitude is not always inferior to 0.5, that make my units to rotate or be OnMove.
This is my NPCCharacter logic:
private void Update()
float cMagnitude = m_RVOController.velocity.magnitude;
m_Animator.SetBool("OnMove", cMagnitude > 0.1f ? true : false);
m_Animator.SetFloat("Speed", m_Animator.GetBool("OnMove") ? cMagnitude : 0);
m_Animator.SetFloat("Direction", m_Animator.GetBool("OnMove") ? m_RVOController.velocity.y : 0);