Line Trace by Channel help please (blueprint)?

It looks like you’re only doing Line Trace once, after Loop completes. This means you’ll only set World Location for one component rather than all of them. You should probably run this after Add Local Rotation node instead, essentially adding component, setting a random location and rotation, then dropping it to landscape below for EACH component made. Right now, you’re only doing it for last component saved in ProcStore variable.

A couple things to consider:

  • You’re setting a Transform for mesh component. Transforms include a Location, Rotation, and Scale vector. If you wanted to, you could calculate random Location and Rotation values and create a Transform, then feed that into Add StaticMesh node. That way you don’t need to add a Local Rotation after creating component.
  • Your Line Trace is using Actor Location for Start value, but this is taking World Location of BP that contains all of this. Instead, if you’re running this all from a single BP, you would want to use location of target component as Start. Try using ProcStore > Get World Location instead.
  • You’ll need to make sure that location you’re giving mesh is above landscape, or it won’t drop and could end up colliding with terrain. For rocks, this might be okay depending on what you’re looking for, but you should be aware of possibility. You can solve this by clamping random vector you’re using for location, if you want.

Happy to help! Let me know if you have more questions.