What is needed to convert a relative rotation to a world rotation

Hey everyone,

How can I convert a relative rotation into a world rotation? It seems like the solution would be basic but for some reason my puny mind fails to comprehend the simple concepts needed to do so.

I am trying to build a BP node similar to “Transform location” but instead for rotation: A node where I can just add in a relative rotation offset and transform (and perhaps parent(s) transforms) and will spit out a world transform. Very similiar to a basic “Add Relative Rotation” but only that I just simply want the value of the output. Simply

Here is a visual example of what I would like to do:
I have an actor that has a box as a root component. Say “hello” to the box! The box is placed in the game world at an angle as seen below.

Now in the same actor I placed a mesh of a cone that is offset by both location and rotation. The cone can be seen in blue below along with its world and local rotation values (truncated).

Now I want to spawn a new actor (tall and thin cylinder) at the same world location as the blue cone, but I want the new cylinders to have a rotation that is a offset that is relative to the blue con, let’s say with a added roll of 45 degrees (Blue Cone Relative Rotation x + 45). Now let’s say I want to spawn several of these actors and multiply the offset by an incriminating value. The desired output would look like this:

Now the issue arises when trying to do this last step. A key thing to keep in mind here is I need that world rotation value for other computations. Nodes like “Add Relative Rotation” do this, but I need the actual value before ANY adjustments are made, and since all these nodes adjust the transform rather than giving me the transform data itself they will not work.
At this point I have a lot of data to work with, but I am unable to figure out the formula to get a relative rotation converted to a world rotation dynamically.

Here is what I am starting with to perform the 45 degree roll example. Any ideas on how I can take that relative rotation pin at the end and convert it to a rotation of the same direction, but for a world transform?

Would anyone happen to know of a formula I could use with all the current data I can track? Am I going about this wrong? Perhaps I should be working with directional vectors instead? I feel like I am over-complicating something very basic, but any assistance would be greatly appreciated.

Discussion thread: Going about rotating actors relatively around child component of another actor. - Blueprint Visual Scripting - Unreal Engine Forums

And solution is to use Compose transform node to transform local offset transform into world space transform. Result looks like this → cube1 is moved 1 meter along Z axis of cone and rotated by 45 degrees.

ComposeTransform_Render.JPG

1 Like