Hi,
I am trying to spawn static meshes using the PCG Framework. Depending on the static mesh choosed, I want to transform my points and scale them or rotate them.
With the version 5.4 of Unreal, I couldn’t find a way to only select the static meshes and add the path (or wathever other identifier) as a point attribute entry. The “Static Mesh Spawner” node have a variable named “Out Attribute Name” that does exactly what I want, but it does also spawn the static meshes (which I dont want because I will continue to transform and filter my points based on the selected mesh).
I decided to create a PCG Blueprint element to do that. I followed this tutorial that explains how to iterate on PCG points using the Point Loop Body (7:00).
It is working pretty well! I have an array with all possible static mesh soft paths that can be used, and I randomly select one for each points. See this blueprint.
However, if I try to use the random stream from the context then the selected mesh will be the same for all points. I tried to create my own random stream within my BP, but the result is the same.
Are random stream just not working in the point loop body?
This is not a big deal for my implementation. The random stream is working in the execute function, so I can just move the random selection into the execute fonction and then store the value in an array in order to recover them in the point loop body.