Creating a Collision Streaming Level

I am using level streaming in my project and went into a problem that can be solved by Editor Plugin.

I have a Persistent level with 3 child levels and every level is taking big amount of CPU & GPU resources.

I have an AI character where he is roaming around all the 3 levels.

Because I want to unload one of these levels when the player is far away from it, but the problem that the AI get falling when it is inside it.

I decided to make a collision only streaming level. So it takes no resources and at the same time the AI will not get fall.

I want to make an editor plugin in C++ where I can select any primitive mesh in the world and press a button that create 2 new primitive meshes that the first will contain all the data of the mesh except the collision, and the other contains that collision instead of making collisions manually.

Appreciating your support. :slightly_smiling_face:

I don’t know what shape your landscape is, but I think it might be easier, from many angles, if you dealt with the AI problem.

What about just putting a large flat mesh under the whole persistent level, so that when another level unloads, the AI still has something to walk on?

Or, coding the AI so it looks for the ground. When there’s no ground, it just hovers and stops trying to navigate.

If I put a large flat mesh , the problem will happen when the level get visible again because the AI will get stuck between the objects.

Also I want the AI go and chase the player or go to other visible level, so it is not good to make him stops in his place.

1 Like