Layering PCG Meshes on top of Each Other

Hello all,

I am trying to basically spawn some PCG spawned meshes over top of other PCG spawned meshes, like in the following example:

1st, spawn some ground meshes on top of a landscape to give the terrain some more detail when viewed up close.
2nd, spawn some small rocks and peddles over the ground mesh PCG elements.
3rd, spawn some ground cover (leaves, sticks, etc) over top both the ground meshes AND small rocks.

If anyone has any info on how this can be done, that would be great. I was trying to do something with the hit ray node, but nothing I did would have the hit ray see any PCG spawned meshes, in either it’s own graph, or from another PCG graph.

Thanks

You need multiple things if you want the World Ray hit to work with PCG spawned meshes:

  • There is a dependency issue, you have to make sure your first meshes are spawned before trying the sample for the second
  • World Ray Hit Query needs to be setup to find PCG meshes (so ignore Self and PCG should be false, and probably channel should be WorldDynamic)

Have a look there, second part, I spawn grass on top of cubes spawned by PCG

1 Like

Thank you very much, and sorry about the late reply. This worked great.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.