I have an actor that will be rotated in various axis combinations (XYZ) throughout the game. The problem with these various rotations, some of these axis will be pointing different directions throughout.
For example, at some point after few rotations, Y-axis will be pointing at Z-axis and the Roll/Pitch/Yaw follows those new axis directions for rotations.
Is there a way to reset its axis pivot back default world axis direction and let me rotate the actor’s roll/yaw/pitch based from that world axis (without changing the actor’s world rotation in transform)?
I’m not sure I understand exactly what you mean, but would it work if you:
Parent your actor under another invisible actor, and then perform any rotations on that one.
At the time you wish to reset the axis you just store the world-rotation of your visible-actor, reset the world rotations of the parent actor, and re-apply the world-rotation to the visible-actor.
I dunno how you’re performing your actual rotations, but if you don’t wish to clutter your scene with extra invisible-actors you could also just do all this with transform-variables and just store/manipulate the “Parent transform” and apply the “child transform” as an offset from that to your actual actor.
Thanks for your reply. Yes I just do standard “Set Actor Rotation” nodes on the actor. I think I get what you mean, maybe perhaps I will store a variable that remembers the default world axis instead of an invisible parent actor. Let me try it out and see