Hi guys.
So I’m using pawn with static mesh that can be moved with WASD and I also set another static mesh as a child from the first on top of it. Then I use FindLookAtRotation then I use SetWorldRotation to rotate the child so its always keep facing mouse pointer. Just like a Tank with the main body and as the parent and the rotating turret on top of it.
To make it look better I build a blueprint so the body(parent) will roll a bit to left or right when it turns. The problem is as I use SetWorldRotation for the turret(child) to face mouse pointer using only Yaw Axis as input, the other input like Roll and Pitch is set to 0.0 as default. This is preventing the turret to follow its parent roll as a child.So while the body is rolling to left/right, the SetWolrdRotation Roll axis keep setting the turret to 0.0 preventing the turret to follow parent roll.
If tried using SetRealtiveRotation instead but its not working. The turret did roll along with the body but as the body change direction, the turret no longer facing Mouse Pointer, is like its not using the turret forward Axis to FindLookAtRotation…
So I was wandering is there a way to set SetWorldRotation to Null instead 0.0 ? or maybe there is a way around it to solve this problem?