Fixed formatting
This commit is contained in:
parent
7c2cdb8cbb
commit
9ace0e4098
6
.obsidian/workspace.json
vendored
6
.obsidian/workspace.json
vendored
@ -27,12 +27,12 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Scripting/UnityEngine.AI/Classes/NavMesh.md",
|
"file": "Tutorials/Enemy AI - Unity NavMesh (tutorial).md",
|
||||||
"mode": "source",
|
"mode": "source",
|
||||||
"source": false
|
"source": false
|
||||||
},
|
},
|
||||||
"icon": "lucide-file",
|
"icon": "lucide-file",
|
||||||
"title": "NavMesh"
|
"title": "Enemy AI - Unity NavMesh (tutorial)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -190,8 +190,8 @@
|
|||||||
},
|
},
|
||||||
"active": "be6bc070960af330",
|
"active": "be6bc070960af330",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"Scripting/Classes/Physics/Raycast.md",
|
|
||||||
"Scripting/UnityEngine.AI/Classes/NavMesh.md",
|
"Scripting/UnityEngine.AI/Classes/NavMesh.md",
|
||||||
|
"Scripting/Classes/Physics/Raycast.md",
|
||||||
"Scripting/Classes/Physics",
|
"Scripting/Classes/Physics",
|
||||||
"Scripting/Classes",
|
"Scripting/Classes",
|
||||||
"copilot-conversations/Robot_can_you_search_the_web@20241023_164312.md",
|
"copilot-conversations/Robot_can_you_search_the_web@20241023_164312.md",
|
||||||
|
@ -13,7 +13,8 @@ Make sure to have the gizmos turned on, as without them, you can't see the navig
|
|||||||
- Add a **Private NavMesh** to your script, call it ``agent'`
|
- Add a **Private NavMesh** to your script, call it ``agent'`
|
||||||
- In your **start** method, set your ``agent`` to ``GetComponent<NavMeshAgent>();``
|
- In your **start** method, set your ``agent`` to ``GetComponent<NavMeshAgent>();``
|
||||||
- And finally, in your **update** run the function ``destination = target.position`` to your ``agent``.
|
- And finally, in your **update** run the function ``destination = target.position`` to your ``agent``.
|
||||||
```C#
|
|
||||||
|
```csharp
|
||||||
|
|
||||||
// You should now have something like this:
|
// You should now have something like this:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user