A rotation related problem/question.
I’m sure this could be fundamentally simple but I obviously lack the needed knowledge to solve it.
Hope someone could help me understand.
My goal is to know: how to rotate a child actor by just rotating its parent so that the child actor will be rotated to match the parent actor’s current rotation.
I can do it if its only one axis, but if the child actor has rotation offset on 2 or 3 axis, I could not find a way to calculate the right value to feed to the parent actor.
I have tried nodes like CombineRotation, DeltaRotation, etc, but have no luck.
Here is an example to illustrate what I mean:
Setup
Here I have 2 chairs with the same location and rotation,
They are paired so the yellow chair is the parent and the blue chair is the child.
I can apply the negative value of the rotation on the yellow parent chair: Z = -90
So that the blue child chair is ‘reset’ back to the old position, as I needed.
Simply using the negative value from the child chair’s rotation does not work, as shown below
How do I calculate the values to put on the parent chair?
I’m not very good with vectors, there is no doubt a fancy way of doing this in BP. For the time begin, it works fine if you swap the parenting and rotate child back to zero