Create custom rotator for multi-component blueprint?


I am creating a light with multiple components, and I need each component to rotate separately to look realistic. I’ve managed to use blueprints to have the spot light component accurately follow a target, but I cannot bet the barrel of the light to tilt accordingly. Right now the barrel seems to tilt down when the target is far away, and tilt up when the target is near. This is opposite, but setting the pitch to be negative helps, but does not totally fix the issue.

Any help would be deeply appreciated!

The project file can be found here: GitHub - RR-bit-pixel/TestFollowSpot

Thank you! I’ve never played with the MakeRotationFromAxes node, so I will take a look at it!

Hello! I can think of two things

  • you can use MakeRotationFromAxes node to fully control all directions
  • there are some moments about angles constraints ([-90, 90] and so on) that can be rather tricky, you can resolve some of them by useing additive logic (not setting Rotator, but Adding Delta Rotator)

Thanks! I will try this out!