hi guys!
starting to mess up for the first time with flying movement behaviour and the flying template.
i’m not really into movement behaviour math and i’m unable to isolate the part of code in the blueprint flying template flying pawn responsible of that going down when turning/rolling on side behavior that is exactly what i don’t want.
i simply want the ship roll on left/right without any pitch modification involved,than i will clamp the rolling so it stops at 90°,keeping the finterp that adjust the roll to 0 when there are no left/right inputs
more i want the ship always going forward with an event tick,the direction is where the camera and mesh are so simply using the left joypad and controlling yaw and pitch,it’s possible to go anywhere.
than to this i would add a rolling movement to the ship when the input is left or right and a small inclination when is up or down.
what would be the simpler and more efficent way to implement this?
hope that is clear and that someone can help
thanks!!!
From what I could understand in the original post, I assumed that they wanted yaw control to not have any affect on pitch and roll (relative to the ground plane). Meaning what they wanted was yaw in the world reference plane. To do that easily, I split the roll and pitch apart from the yaw by using local and world rotation functions. I am applying pitch and roll input in the actor local frame and applying yaw input in the actor world frame. The extra code in the top should pull your roll to 0 when no input is applied (I think based on what I remember).
The code in the top right does the following. It applies the current roll angle as an extra roll delta in the opposite direction to return the roll to center, The value in the clamp function sets when the return force activates because for values less than its threshold it will be v - v, but for values greater than its threshold it will be 45 - v which will then apply a delta to keep the roll at 45 degrees. It was a simple way to virtually lock the roll to a set range. Adjusting the return force by changing the divisor will change how much it will fight you, and setting the clamp value to a smaller range will make it correct roll at a sooner angle. If you replace the output of the clamp function with a constant zero, it will return to zero.