- Home /
Writing a Custom Collider
I am currently in the process of creating a game that uses procedural heightmap terrain generation. Originally, the terrain was made through a MeshObject
built from scratch from verts and tris, but building the collider was much too slow. Fortunately, Unity soon released the Terrain
system, which can build terrain with a heightmap in much less time. Unfortunately, Terrain
refuses to play nicely with procedural generation, so everything from setting textures to aligning seams is apparently impossible at runtime. I've set out to write my own terrain system. I know how to build the mesh and manage the terrain and everything but there is still one problem.
Long story short, I have no idea how to write a custom collider without using the MeshCollider
system (which is seemingly not optimized for 2D heightmaps). Is this even possible? Alternative heightmap-based procedural terrain methods are also happily accepted.
Your answer
Follow this Question
Related Questions
Mesh based on noise 1 Answer
Best way to get terrain positions from a given height range 2 Answers
Terrain height map influences ocean wave heights? 2 Answers
What makes up the binary data of a 16-bit heightmap? 0 Answers
How to seamlessly tile terrains 0 Answers