You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve Spawner System by either doing a downward ray cast or getting navmesh position to determine floor position. Adding a Vertical offset to the spawn SO. This will make sure the spawned GO always instantiates are appropriate height
The text was updated successfully, but these errors were encountered:
Code below does not function as expected in ComponentSystem.
bool RandomPoint(Vector3 center, float range, out Vector3 result)
{
for (int i = 0; i < 30; i++)
{
Vector3 randomPoint = center + UnityEngine.Random.insideUnitSphere * range;
NavMeshHit hit;
if (NavMesh.SamplePosition(randomPoint, out hit, 1.0f, NavMesh.AllAreas))
{
result = hit.position;
return true;
}
}
result = Vector3.zero;
return false;
}
Improve Spawner System by either doing a downward ray cast or getting navmesh position to determine floor position. Adding a Vertical offset to the spawn SO. This will make sure the spawned GO always instantiates are appropriate height
The text was updated successfully, but these errors were encountered: