Using Rigid Bodies with Path Finding

Hi all,

been experimenting with pathfinding in Unity lately, I can get a decent path along with some objects that follow the path nicely, turn and face the path etc, but I’m using using transform.fwd, or translate commands etc to move the objects. I’ve read its much more efficient for Unity to deal with rigid bodies when dealing with moving objects, so I should be assigning rigid bodies to my objects and manipulating them using addforce or addtorque etc; shouldn’t be modifying the velocity or direction of object directly as that upsets the physics Unity is applying.
But the complexity seems to go up 10 fold - you can’t really predict what will happen to a rigidbody and keep it on track following a path. Further complexity comes into play when theres more than 1 of these and you try and implement some sort of avoidance methods such as in Daniel Shiffman’s Nature of Code Examples. I notice most tutorials on line stick with moving the transform and not worrying about using rigid bodies on the objects. Is it imperative I use rigid bodies for performance reasons only ?

Generally yes… If you have one person/character you can sort of get away with not doing it, but if you want to have lots of people/creatures/whatever, you need to have rigidbodies/colliders setup, otherwise performance will be taking a hit (at times a large one).

You can add a rigidbody, and set it to kinematic if you want to move it using Translate/Rotate, but you will have to manage everything including gravity.

The FPS rigidbody controller here is quite good: http://wiki.unity3d.com/index.php?title=RigidbodyFPSWalker