Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use Unity 3D navmeshes for 1st person navigation?

I developed some applications that allow the user to explore an interior environment in 1st person and, in order to obtain a smooth walking while dealing with all the collisions with walls and objects my scripts grew in complexity so,

premising that I know that navmeshes are mainly designed to compute paths for a moving agent, I was wondering: is there a way to take advantage of navmeshes to navigate in 1st person? Or would it be just a waste of CPU time?

Thank you for any advice.

like image 234
SteakOverflow Avatar asked Oct 19 '25 14:10

SteakOverflow


1 Answers

Using a navmesh to navigate in 1st person, you would have to recalculate the agent's path on every user input. You would have a very hard time to keep the walking smooth when sliding along a wall. (Sliding against a wall is essentially walking into the wall, detecting and correcting that and using only the part of the direction vector that is tangent to the wall - achieving similar smoothness using navmesh navigation would be hard.)

like image 185
Jinjinov Avatar answered Oct 22 '25 20:10

Jinjinov