Generate random points on a static mesh

Is there a way of generating random points on the surface of a static mesh that items can be attached to? For example, points on a statue to which butterflies will settle and cover said statue? Using vertices perhaps? I’m hoping to use blueprints for this. Thanks in advance.

1 Like

Yes. You can use line traces from outside the object, heading inwards. Put the butterflies at the intersection point ( you will need complex collision on for the mesh ).

On object

You can also do this with PCG, of course. Then you can target the vertex data of the mesh…

5 Likes

That’s really useful, thank you. I knew PCG might be an option, but line tracing never occurred to me for some reason. I will investigate further.

1 Like

Hey there @Astro-Chris! Clockwork’s setup is great! An alternative if you wanted to use vertices for any reason, you can use Rama’s Victory Plugin to get the SM vertex locations regardless of scale. I use this for finding verts and iterating on them at runtime myself.

2 Likes

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