Forum rules - please read before posting.

NPC follow player doesn't detect hole in Navmesh

Hello Chris, Im haveing a problem with NavMesh Holes, but, only with NPC. In the center of my scene is a hole and my player detect it very well, but when NPC start following player then NPC went through hole without detecting it or go around it. I've look what happened with player and tryed to do the same thing with NPC but its not working. My NPC who follows my player is constantly updating where is player now, instead where was the player second ago when update started (when player goes around that hole i see blue line with pathfinding and it goes all around that hole, thats grat, but when player is on the opposite side and NPC start to follow he goes right throu that hole with no detection) i will screenshot you this but i need to know if there is maybe some bool, check box i forgot to turn on, or maybe in actionlist NPC to follow is set on wrong nubers... i just dont know what to do its importan for my NPC do detect holes. 


PrintScreen of scene

Here is printscreen of scene, red star is place where Player and NPC started, Blue line out of hole is players pathfinding line....

thanks for your time.
Andrej

Comments

  • Anyone? Any kind of information would be great...
  • I didn't see this thread until now - I apologise.

    It looks like you've done everything correctly, so I'll try to recreate this issue on my end.  There seem to be a few warnings in your Console window - are any of them relevant?
  • No, warning are not relevant for this topic. 
    thank you, i hope i gave you enough informations. like i sayed, with layer is everything ok, maybe tweaking NPC script or so...

    Thank you for trying. :D
  • typo: player*
  • You're right, it's a simple tweak.  NPC.cs, line 214:

    Change:
    pointArray = KickStarter.navigationManager.navigationEngine.GetPointsArray (transform.position, targetPosition);

    to:
    pointArray = KickStarter.navigationManager.navigationEngine.GetPointsArray (this, transform.position, targetPosition);
  • You sir are a genious!!! much tnx... i change it... but it was 193 line... i have 1.45 maybe that so. but Problem solved.
    Thank you Chris. 
  • No problem.  Though I would recommend you update to the latest, as each release fixed many bugs.  So long as you back up your project first, and carefully read the "Upgrade notes" for each release in the changelog, you should be fine.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.