BEPUPhysics and SunBurn Terrain

Mar 2, 2012 at 8:16 PM

It seems like the implementation of the physics engine works directly with terrain in the SunBurn implementation, but how might I achieve the same ability with the IGF physics implementation? I'm loading in the .ter file as MeshData and submitting it to the render. I think I need to generate a staticmeshcollisionmove, but I'm not entirely sure if that's the proper system, and even then I'm not sure if there is a simple way to convert MeshData to a model.

Mar 3, 2012 at 12:08 PM

The terrain isn't implemented yet but you should be able to get it on your own quite easily.

StatickMeshCollisionMove shouldn't work as it expects a Model instance to build up the geometry out of it.

However, you could go down a similar implementation for a TerrainCollisionMove but instead of passing a Model, you could pass a IList<Vector3> collection which would contain the vertices list and then use this to populate the inner SpaceObject instance as I do extracting the Model's meshes vertices ;)


Mar 5, 2012 at 10:09 PM

Thanks! That's a good idea. I ended up using the SunBurn built-in physics since I don't need a whole bunch of customization yet, but if I do end up heading down that road, i'll let you know how it goes.

Mar 6, 2012 at 8:31 AM

That's cool.

Just to mention that I read on SunBurn forums that their terrain collision system can come up with some issues as it's collision mesh isn't as detailed as the original terrain patches which can lead to situations where collisions won't be applied correctly. They are working on it based on their latest reply.