Question: Terrain + Collision + Physics

Well it would have to be in the scene if the unloaded chunk has something happening in it, like a battle or something being built.

You could be right. But I’m not sure if that would be necessary really. If you have the approximated distances between objects I guess you could start a virtual fight between the two.

Ok, I didn’t know that…

The major problem here is the complexity. You must delete and then re-spawn the objects. Delete is not a problem, but respawn is another thing. For an open world like skyrim you should use a database to store the position/orientation/stats of each object in the game. Actually from my point of view, maybe a tree structure of areas could be faster, but the database is still important to store other information on a RPG, such as items, books, quests, etc…

You’re right. It depends on the complexity. Anyway, I think it’s worth trying to continue AI behavior behind the curtain. Just thinking aloud. To integrate this with the terrain section loader around the player, additionally you could also load those sections where the AI is situated, so they have an area to move in. Since all objects in a section (static terrain segment, static obstacles, dynamic AI) will be invisible, for the most part it should only affect physics calculation. So I think it’s worth having a try with this approach. I won’t be working on it in a while though. Not much time to spare nowadays.

Don’t over think it. You only need to cut up the mesh and make the parts no collision. Then use an invisible copy of the uncut mesh as the physical object. Blender’s out of frame culling will handle the rest.

From what I can say with large terrains (f.e. 1024 X 1024 vertexes) it’s better to cut up the physics mesh too.

Edit: I was wrong! Just tested such scenario and no physics problem there!

Sorry that I’m returning to this but I just thought of something; Would you also split of the navmesh or would you make separate ones for each chunk, or would you just have one regardless of chunk separation? I assume it’s the latter since an AI can only use one navmesh… as far as I know. At least, one per steering actuator anyway.

you can change the nav mesh with python,

I think

http://www.blender.org/documentation/blender_python_api_2_62_1/bpy.types.SteeringActuator.html

You can use a Python script to change an AI’s navmesh at will. Connect your Steering actuator to a Python controller and just use

bge.logic.getCurrentController().actuators[actuatorName].navmesh = "navmesh_that_the_ai_is_touching"

May be a little long but you get the idea =P

Oh ok thanks. So basically you can probably use a collision sensor so that when the enemy hits a new mesh the mesh changes right? (With a little more detail I’m sure.)