Pawn Camera Locked to forward Vector

Hi, I have a problem that I can not solve for some time, I have implemented in my game the possibility for the player to possess a drone, which he can then move with a simple floating pawn component.

My problem is the following: when I control the drone, after a certain random moment, the rotation of the drone’s camera on the Z-axis locks to its initial position and I can’t rotate the drone anymore (I can still move forward/backward, go left/right, and up/down).
This is the first part of the video on the right when i get this shaky movement.

I rebuilt the exact same system in another project and it works perfectly, (second part of the video)

I tried to find the differences between the two projects that could impact this “bug” (Inputs, controller rotation, code etc) without finding a solution, if someone has an idea of the problem it would be great.


The Blueprint Code for drone’s movement (i add controller roll input instead of yaw juste because of the rotation, of my skeletal mesh in the viewport but i also try it and it doesn’t resolve my issue)

Bp_Drone_ControlRotation

Ah, seems to be the classic Euler Gimbal Lock. I suggest you look at the video.

Here is a part of the forum which explains solutions regarding this problem: How can I avoid Gimbal Lock with Rotations?