Hi,
I have a floor which the AIs walks on normally, but when they go upstairs and there is finish platform (so different navmesh surface and data) they don’t walk on it. But they also don’t stuck, just immediately skips over that surface. But if this is not the finish floor and the clone of normal floor there is no problem, they continue to walk normally. When they reach the finish floor, I disabled the set destination function to check if it’s related to it but it is not. And there is no other code to change their position.
I also tried adding navmesh link between two floors, maybe it’s because of the link. But I don’t know I’m doing it correctly. I have no idea other than that.
This is the video of that part: 7gwzbi
How are you doing so the AI walks between the 2 Areas using the Ladder?
Maybe that is causing the AI Walking up the “Stairs” thinking the AI is moving forward, so when they are up, they straight get moved to the end?
When they come to the ladder I disable navmesh agent and move them manually by using dotween doMoveY function. When ladder ends I enable navmesh agent again. (Actually I tried checking if there is a problem about enable/disable but I couldn’t figure out anything. Changing them caused other problems but maybe still this is the problem and I couldn’t manage it.)
Also like I said before, if there is the clone of the first floor instead of the new platform, there is no problem. After climbing ladder they walk on the surface. So I didn’t associate the problem with ladder.
I’d like to add that I have never used navmesh before, because of that I don’t know if there is something simple I missed.
I would suggest, after reaching the ladder, dont disable the navmesh (or do so if needed) but before, set agent to be stopped, since you disable it and enable it, he straight try to move towards the destination (what he should do) but maybe thats causing the problem, ofc. after reaching the top of the ladder, you need to reassign the destination.
Weird is that if you copy paste the platform that it does work but by adding a new one, he fly through, if you find the solution, would love to hear it
I will try it and okay if it is solved I will inform.
Thank you:)
1 Like
Eventually I found the problem… It isn’t related to navmesh, there is just a silly mistake in my code about changing a boolean value that blocks the movement of AIs:/