NavMesh-Tutorial icon indicating copy to clipboard operation
NavMesh-Tutorial copied to clipboard

Scripts

Open byelik opened this issue 6 years ago • 7 comments

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!

byelik avatar Jul 02 '19 07:07 byelik

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.

sqr1be avatar Feb 25 '20 18:02 sqr1be

Did you do it in game mode?

MTF-TAU-5 avatar Jun 16 '20 01:06 MTF-TAU-5

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.

shrivaths16 avatar Aug 29 '20 11:08 shrivaths16

"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

arch-kobra1985 avatar Jul 17 '21 01:07 arch-kobra1985

Screen Shot 2021-07-16 at 8 25 21 PM

arch-kobra1985 avatar Jul 17 '21 01:07 arch-kobra1985

I was in play mode when it happened

arch-kobra1985 avatar Jul 17 '21 01:07 arch-kobra1985

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; }

jeddles88 avatar Apr 25 '23 01:04 jeddles88