- Home /
Unity Best Practices for Physics + AI
Hello! I am trying to make an AI game similar to SA2 Chao Garden and other games like Pikmin where I want to make AI that have physics of some sort.
I know the ML-Agents/Navmesh system seem to conflict with how I would like to do things and the rigidbodys seem finicky at times + don't work to well with these systems.
What would be the best approach for AI and a physics system in one game? Should I be coding my own systems, or at-least coding the AI and using rigidbodies as to not reinvent the wheel?
Answer by Dag-Tholander · May 06 at 06:52 AM
The NavMeshAgent has a property called "desiredVelocity" : https://docs.unity3d.com/ScriptReference/AI.NavMeshAgent.html You could read from this value and then apply physical forces in order to move the body based on it.
Your answer
![](https://koobas.hobune.stream/wayback/20220613060203im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Turn character by force 1 Answer
AI Aircraft/Spacecraft yaw and pitch help 1 Answer
AI script not using gravity 1 Answer
Shell Drop and Aiming 1 Answer
How the heck AI villager movement? 0 Answers