Let’s say I have a box of tree meshes, that spawn at random locations in a collision box. How would I get those trees to spawn in a cluster around the center?
You could generate a bunch of points inside the box then check the distance to each points from the center, if it’s too far from the center, remove those points. Then spawn the trees on the remaining points.
At the most fundamental level, you could check random points’ distances from origin and reject the ones too far away:
Which produces:
For something more nuanced, research Wave Function Collapse. For something even more nuanced, you could incorporte sobol - a bit tricky as it’s utterly undocumented in UE (still?), but the idea is engine agnostic, so it’s a matter of understanding the principle.
I should have mentioned that I’m a noob who relies on youtube tutorials. I want to recreate what you’ve done here, but I’m only getting ignore messages, and I know I missed something. First of all, how do I specify the origin point? Shouldn’t that be the collision box?
What are those?
First of all, how do I specify the origin point?
It’s a variable you create yourself, punch in the values you need - where the centre goes.
can I do this in level blueprint to test it?
Yeah, the above was done in the LB.