Answers for "get random point on navmesh"

0

get random point on navmesh

Vector3 randomDirection = Random.insideUnitSphere * walkRadius;
 randomDirection += transform.position;
 NavMeshHit hit;
 NavMesh.SamplePosition(randomDirection, out hit, walkRadius, 1);
 Vector3 finalPosition = hit.position;
Posted by: Guest on April-22-2021
0

get random point on navmesh

Vector3 randomDirection = Random.insideUnitSphere * walkRadius;
Posted by: Guest on April-22-2021
0

get random point on navmesh

randomDirection += transform.position; NavMeshHit hit; NavMesh.SamplePosition(randomDirection, out hit, walkRadius, 1); Vector3 finalPosition = hit.position;
Posted by: Guest on April-22-2021

Code answers related to "get random point on navmesh"

Browse Popular Code Answers by Language