Hi, I’m creating a flexible festoon lights blueprint - I can get my mesh to conform to a spline and place meshes along it for the lamps. I have added a random twist to the lamps, but I cannot get the UE lights I create to follow.
I would need to take the rotation of each lamp and offset a point light along the Z axis, to get the light in the right place (approx -10 units)… see example:
However, whatever I have tried has produced very random results.
The lights either all follow the cable, follow the cable but are offset in line, or cluster together in their own random ways…
How do I take the rotated meshes (A) and use them as a ‘parent’ to offset the point lights in the correct direction in each case (?)
In the construction script start by calculating the amount of bulbs that fits in the spline based on the spline length and the spacing distance. You will use it in a for loop:
With that, you should be able to generate random rotations without any issue!
Quick advise: be sure to set the “Coordinate Space” for both nodes “Get Location at Distance Along Spline” and “Get Rotationat Distance Along Spline” to “World”, and set “World Space” true on the Add Instance node!