Rotate multiple objects with different orientations in the same direction. Maintain Offsets

I have multiple objects that are scattered. I need to rotate them in the same direction regardless of the orientation of the local axis of the scattered objects. The rotated objects need to maintain their offsets.

@TinyTracker1 Hey! It depends a little on what data you have at hand. You need to first build your new Rotator and then apply that rotator to each actor, by using the SetActorRotation node.

In this example I have two sample actors and I rotate all the other actor in the direction that points from the first sample actor to the second.

If you already have an actor pointing in the direction that you want, you can pass that rotation directly into the SetActorRotation node.

Hope this helps!

1 Like

I don’t understand what this is. How does this maintain the offset of the objects current orientation while rotating in the proper direction? This looks like it just copies the orientation from one object to another.

I think I didn’t understand the question then, what did you mean by

And I see you marked it as resolved, so it actually helped you get your code working?

Unfortunately that was a misclick. (I’m not used to the way these forums do things) And I had to create the topic again. But the good news is that someone was able to show me how to solve the problem. But I do appreciate that you tried though. (the same question but a bit more specific)

Nodes “Add actor World rotation” instead of “Add actor local rotation”