playMaker

Author Topic: Navmesh path check?  (Read 951 times)

IIKII

  • Junior Playmaker
  • **
  • Posts: 83
  • Lonely developer
    • View Profile
    • Patreon
Navmesh path check?
« on: January 18, 2017, 06:04:35 AM »
Hi, I am using navmesh for my enemy AI but there's some problems that I dont understand.

I put my player as the enemy's agent destination and if the player is out of the range of the blue navigation area, the enemy will stop chasing but there's no good action to check if the destination path is out of range..

I tried using actions like 'path is stale', 'check path status' and other ones but none of them is working as I thought to be.

Am I missing some key knowledge on using navmesh?
Support me on Patreon for free adventure games and development insights - https://www.patreon.com/koexstudio

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 607
    • View Profile
    • Flashing Lights
Re: Navmesh path check?
« Reply #1 on: January 18, 2017, 08:24:24 AM »
Maybe you can check distance and if more than X, stop chasing.

terri

  • Sr. Member
  • ****
  • Posts: 373
    • View Profile
    • terrivellmann.tumblr.com
Re: Navmesh path check?
« Reply #2 on: January 18, 2017, 08:46:36 AM »
try setting the player as the destination, waiting like 0.1 and then use check path status

IIKII

  • Junior Playmaker
  • **
  • Posts: 83
  • Lonely developer
    • View Profile
    • Patreon
Re: Navmesh path check?
« Reply #3 on: January 18, 2017, 10:38:27 PM »
Wait for 0.1 and using path status > 'Path undefined event' works for checking if the destination is outside the blue navigation.

Thanks..
Support me on Patreon for free adventure games and development insights - https://www.patreon.com/koexstudio