Following the second answer to this post by Steve Allison - How would I get my character rotation to match the gamepad stick orientation? - Programming & Scripting - Epic Developer Community Forums
(My implementation)
I successfully implemented the analog following where the character is facing. However, as someone else commented on his response, it immediately snaps you back to the default position afterwards and he suggested a check to see when the stick is reset. I added a check for when the vector result (both axis values) is 0 (analog not in any direction) and whilst this doesn’t return to the default position, it does return it to a 90 degree position (0, 90, 180, 270) so if I was at 104 it would snap to 90 which is still not correct for what I want. I assume it’s because the release point of the analog stick would leave one axis as 0 and another at just above/below 0 for a moment so it snaps to the last position that wasn’t zero. Is there a more sophisticated check for where the analog was just facing? I tried adding a checker to whether the axis value was between -0.1 and 0.1 but this kept the same issue (the reason it wasn’t checking for full (1) is because I want to allow a sneak type functionality where the character can still turn even if the analog stick isn’t fully to the edge of any direction.
Any advice would be appreciated.