I’m not too worried about players cheating, it’s a single player game and the points are just for fun, they don’t contribute to the gameplay too much – if the player wants to cheat, then so be it
Let me visualize what I’m trying to do and what I’ve tried:
This is how I’m handling input, just a simple add controller yaw/pitch.
When the player jumps, and does a full rotation in the air before landing (example in video), they get a point (or something else, it doesn’t really matter right now). Eventually I’ll do a check so the player can only do this if their velocity is high enough.
2022-01-02 12-50-53.mp4 - Google Drive
I set an initial yaw variable to the yaw of the pawn’s control rotation when the player jumps, and a bIsInAir bool, so I can reference it in an event tick to check the player’s yaw in the air every tick.
Now, on event tick I can check what the yaw of the player is when they’re in the air. By @pezzott1’s advice, I need to offset the current yaw from the initial yaw. I’ve done this (incorrectly) by subtracting the current frame yaw by the initial yaw. It kind of works, if I jump at yaw 270, I get a value of 0, so when I move the player view right (in air) to, say, yaw 300 – the delta yaw will be 30. However, when the current yaw reaches 360, it rolls over back to 0, so the delta yaw becomes -270, which I don’t want. I hope I explained this right, I know I’m offsetting the value incorrectly, but I think I’m going in the right direction.
Thanks for helping me out