game: setting up nav mesh in game scene

This commit is contained in:
ryan 2025-02-17 16:19:41 +08:00
parent 9bfafdd4ae
commit d8328fa3c7
4 changed files with 1484 additions and 1317 deletions

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@ public class UIFacePlayer : MonoBehaviour
void Update() void Update()
{ {
if (playerCam != null) if (playerCam != null && Vector3.Distance(transform.position, playerCam.position) < 2)
{ {
transform.LookAt(transform.position + playerCam.forward); transform.LookAt(transform.position + playerCam.forward);
} }

View file

@ -11,8 +11,8 @@ NavMeshProjectSettings:
cost: 1 cost: 1
- name: Jump - name: Jump
cost: 2 cost: 2
- name: - name: grass
cost: 1 cost: 2
- name: - name:
cost: 1 cost: 1
- name: - name: