I noticed when i create object (any object) that has navmesh pathfinding behavior game freezes for a second and then if i create the same object again there is no any freezes, so i wonder if there’s any way how to avoid this problem?
Upd. I noticed that it happens only when created object is 3d object with navmesh behaviour. I also noticed that when i create this object without navmesh behaviour game doesn’t lag, and when i create just some 2d object with navmesh it doesn’t lag as well. So i wonder if the problem is just mixing 3d object and navmesh or i guess this lag is caused with navmesh getting collision mask of 3d object which is not loaded in the memory yet or smth like that…
Upd. I was wrong. It seems like the problem is not in navmesh behaviour, cause i did some tests and found out that lagging happens only when i try to cast a ray from just created object (raycast happens just once, not multiple times) and without it everything works fine. But using raycast is necessary for my enemy’s logic, so I’m going to try to solve it somehow…
Upd. I was wrong again. The problem was actually navmesh behaviour, cause when i replaced this behaviour with built-in pathfinding there was no any lagging at all (with the same enemy’s logic), so I’m going to stick with built-in solution, which is fine, but i still don’t understand what is the problem about navmesh with 3d object
The extension was built before 3D support was added to the engine.
I would imagine it doesn’t support 3D at all, but was designed to accept all object types so it could work with sprites, tiled sprites, and panel sprites.
I wouldn’t expect it to work with 3D objects at all (completely different renderer and math required) unless the dev decides to update it.
Edit: to be clear, I only know the above because I’ve been around since it was last updated. Unfortunately I don’t know how you’d be able to tell if an older extension was developed to support 3D or not other than through direct testing or already knowng.