Hey, I am pretty new to Unreal Engine and I am trying to make an airship that moves to a location automatically. The map is really big and I tried to use an AI move to with NavMesh but the NavMesh is causing a lot of lag when starting and running the project. Can anyone help me with this? Thanks in advance.
You can’t use a nav mesh with a “flying” actor. You need to build your own method for 3D navigation in space. You would need something like a custom bounding volume, and then “get random point” node and select a random point within the bounding volume of a collision box or something you place in the level and then script the logic for the airship to fly to that location.
like I said I am pretty and I have no idea how to do the custom 3D navigation, but the airship is likely gonna be flying above everything. The maps is also really big about 40 million uu(Unreal Units) so a bounding volume that big would cause a lot of lag. Is there any way to do this without a bounding volume??
That is a great idea but a NavMesh that big would kill the game. Just to add to that the character going up and down the slopes will make the airship go with it and I don’t want that, what I can do is create a flat ground underneath the map for that. Is there a way to navigate flat ground without a NavMesh?
How about this? Create a GroundPilot (or whatever you want to call it) pawn class which inherits from whatecer class can use navigation meshes, make sure it can navigate over ANY slope and any step down size etc, make it so it has no collision for anything in any way, make it completely invisible, and have THAT PAWN do the AI navigation, and just have the airship follow it around.
Would that work maybe?
Yes, I could take out the Z axis when making the follow but I was think the ground pilot is the same actor as the airship. Like the airship is really high above the capsule component and while the capsule runs underneth the map the airship flies above it.
Ok yes you could do that instead. just bear in mind that for very large maps you can use some kind of dynamic navmesh thing that auto generates and adjusts as you move around.
Also the airship can follow horizontally withot following vertically when the groundpilot moves up and down slopes (you can leave the Z coordinate off of the destination follow)
no i meant for them to be separate actors. the airship can spawn its little buddy on the ground as soon as it begins play and assign him to a variable and you can reference that pawn variable to grab the horizontal location to move toward
but yeah you could have a flat surface under the level like you were saying. simplest solutions are offen better!
I was just thinking, does the navmesh have to be the same for different AIs to find each other easily?