Scripts
Hi, thanks for you tutorials. I've downloaded the source code, but there are not all scripts in the repo. Is it possible to get all needed scripts for these tutorials? Thanks in advance!
yeah, not helpful. The playercontroller script i copied verbatim from the youtube video, and my little agent doesn't do any movement really. if i click on the agent it'self it seems to move a little. like, micro units.
Did you do it in game mode?
Adding the box collider to the ground is actually necessary and not optional. We need a collider to detect the mouse clicks. Clicking on the player moves it because it has a capsule collider on it.
"SetDestination" can only be called on an active agent that has been placed on a NavMesh. UnityEngine.AI.NavMeshAgent:SetDestination (UnityEngine.Vector3) playercontroler:Update () (at Assets/playercontroler.cs:21)
is what it said for me when I added a box solider to the ground
I was in play mode when it happened
theres a few issues in these examples example one needs a box collider to work
example 3 needs more code in start on player controller so that when the player spawns it has a meshagent and a camera. void Start() { agent = gameObject.GetComponent<NavMeshAgent>(); cam = Camera.main; }