#AI NavMeshSurface Disconnection

1 messages · Page 1 of 1 (latest)

south smelt
#

I have an EnemyAI code that can jump to moving platforms and such, and has an emergencyprotocol state for if the enemy is too high on the y-axis from his current waypoint down below. For some reason, when testing this, when the enemy goes to the emergency waypoint located on the moving platform, he will disconnect from the surface on the FIRST time going down, but will always succeed on the second time. I have already tried removing the redo on the stop state, and seeing what would happen with just the transition to the emergencyprotocol, and that made him disconnect every single time. I am somewhat stumped on how to solve this while still allowing the enemyAI to access his emergency waypoint to safely and logically get back down on his own.

I will show the code if someone responds and asks for it, as i do not feel like pasting like 500 lines of code.

#

(well... technically only like 50 out of those 500 but still!)

wooden robin
#

you can post the code on https://paste.myst.rs/

south smelt
#

thancc

#

this is the part of the code i took out for the specific issue. it says "C++" but i didn't find where to change it to "C#" so just ignore that.

south smelt
#

also quick note, this is on a moving navmeshsurface which works in every other concept except for when he comes back. it works fine when chasing.

south smelt
#

update to my issue, i added a check to see if the ai is not on a nav mesh, then do an errorlog message. he is clearly floating and not moving, and yet no error.

south smelt
#

tried to parent the ai to the moving platform, that changed nothing at all.

south smelt
#

i've come to notice that the AI will not move with ANY NavMeshSurface for a little bit whether it be going up and down or rotating. it worked before but now it's iffy.

south smelt
#

so the issue is solved kinda? it's almost if the enemy ai is still set for its destination to be the emergency waypoint while the platform moves, that's what gets him stuck for some unknown reason.

#

(the waypoint is attached to the moving platform but i am unsure if that is the reason)