Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Pushed an update that fixes this just now! Let me know if it works on your end if you try it again
Gargin, you're gonna want to be careful about where you call PathFollower:Compute. If the goal position is somewhere out of bounds, it'll search the entire navmesh before giving up. My lazy hack in Sanic was to detect when it took too long and stop trying to pathfind for a bit. It's hitch-prone but won't tank framerate. If you were feeling fancy, you could try tweaking the generator function to give up after a while instead. It might even be worth doing a quick nearest-navarea search on the goal position to avoid trying to path to somewhere you can't get to? There are a lot of options here.
Also I'd like to report a bug. If he can't pathfind to you while stalking, he'll stop doing anything and never recover from that. You might want to refactor his AI into a state machine (HIDING, STALKING, CHASING, ...) to make the state transitions a little more obvious.