If you do need to solve the gimbal lock problem, here’s the solution I use in my projects. Since the problem keeps coming up and it may help others…
The macro below is to be used to find the rotator to add to your current rotator to make it from its current forward vector to a new forward vector bypassing the gimbal lock.