You mean you’d like the child to orbit the parent when its rotation is adjusted?
Well, at least I’ve got math in me. Quaternions are scary.
I’m scary. Can relate. Alright, I’ll bite. But this did take the better of my morning. So no blueprint, just the math this time.
Convert Child_Transform and Child_Rotation to local world space:
Child_Local_Translation = Parent_Translation - Child_Translation
Child_Local_Rotation = Parent_Rotation - Child_Rotation
Rotate child locally in relation to the parent:
Rotates a cartesian vector using the FRotator quaternion with GLMs dot-dot-cross implementation.
Child_Local_Translation = 2.0f * dot(Child_Local_Rotation, Child_Local_Translation) * Child_Local_Rotation
+ (Child_Local_Rotation.W * Child_Local_Rotation.W - dot(Child_Local_Rotation, Child_Local_Rotation)) * Child_Local_Translation + 2.0f * Child_Local_Rotation.W * cross(Child_Local_Rotation, Child_Local_Translation)
Now convert those to world:
Child_Translation = Parent_Translation + Child_Local_Translation
Child_Rotation = Parent_Rotation + Child_Local_Rotation
When you run your game, this should cause your child to orbit its parent, by treating its world space coordinates appropriately relative to the parent and applying a computer-optimized Rodrigues rotation formula, regardless of any Unreal parent+child relationships made in the editor.
Suggestion: You could also extend this by using the GetBounds trick to rotate the child from the center of the parent, similar to the orbit feature you are describing. This concept will rotate from both pivots.
If you want to see this in the editor, you’ll need to configure your actors to be able to tick in the editor and override one of the editor events related to moving the actor in its class, which to my knowledge is a C++ only thing, unless I’m wrong.