0 like 0 dislike
454 views
I got the particle collision inside Unity working by using the SceneMeshBuilder script. However there are two problems I ran into:

1) I can't seem to get my particles to to collide with the terrain. The terrain itself isn't really a mesh so the mesh builder can't seem to work with it. I could convert it to a mesh and then bring it back in, but sounds a bit over the top just to have simple terrain collision. Any idea on how to approach this?

2) The collision meshes are pretty big. Our game has about 40 levels and the scene meshes for each one end up being 50MB - 100MB in size. Having several GB of collision meshes blows up build size, not to mention that those will be in memory somewhere when being used. Is there any other smarter way to get popcorn effect to collide with the environment, without such a huge overhead?

Any suggestions are appreciated.
by HolyManfred (140 points)

1 Answer

0 like 0 dislike

Hi,

Sadly, there is no other way than to convert your terrain to a mesh and feed it to the mesh builder.

For the size issue, you could try to generate a mesh of your terrain with less vertices.
You can look into this script (you'll probably have to modify it to get a lower vertex-count) : http://wiki.unity3d.com/index.php?title=TerrainObjExporter,
Or you could turn to the Asset Store. There's probably several solutions but this plugin seems to allow you to control your vertex count : 
https://www.assetstore.unity3d.com/en/#!/content/47276

by Valentin (7.1k points)
Thanks for the info. Sadly that doesn't really sound like an alternative. The extra work overhead would be pretty high.
Do you guys have any plans on adding dynamic collision support to the plugin?
Unfortunately, we can't do it due to Unity limitation.
We have planned to add dynamic collision but not for the static objects like
the scene.
...