I’ve successfully assigned an array of triangles to a custom mesh, and it’s displaying just fine. What would be the best way to enable collision for this mesh during runtime? I want the player to be able to walk upon the mesh.
I am using a 3d simplex noise function in C++ that I’ve exposed as a blueprint node to generate the terrain on the fly, seeding a random float to the Z value for randomization, using the rest of it as a 2d noise function (hope that makes sense). Long story short, I’m generating random terrain via custom mesh triangles, and I want to walk on it.
And here is the screenshot of the custom mesh triangles in case anybody was interested in seeing what I’ve got so far (they still don’t have collision though):
I’m also trying to find out what other problems I might run into in terms of AI, navmesh, and level streaming using a noise function to generate a world. As far as I know, there aren’t a lot of examples of this type of world generation in UE4, and I’m interested in what kind of trouble I might run into later, but I’ll save those troubles for other questions, right now I really just want that collision!
If there is a better way to generate terrain like this, I’d love to hear it as well.
It would be really neat if there was a way to feed my noise height values to a landscape at runtime, and use that instead, but as far as I know, that is not supported for landscape.
Yeah from what I read, it doesn’t support non-editor physics cooking at runtime, although i might mess around with some of the code snippets from the wiki example. Thanks for replying though! hopefully there will be a way to do it in 4.5
It would be cool if they made a blueprint node for making physics collision primitives with vertices or something like that. I don’t know exactly how the system works for assets generated at runtime though. I’m sure i could extend and expose some things to make one though if I dig around in that example.
That’s what I did and was running into an extreme amount of hanging. It would be best to create the mesh and collision in a separate task and then place in the world when it is finished.