wich is called when the player moves to rotate the camera where the player is looking (only the head rotates if the character is immobile)
Its working great exept when the capsule component yaw is close to 180 (or -180 ofc), the character just make a full 360° spin to get the body to position lmao
so either there is a way to fix this or I need a way to check if the camera should go left or if it should go right
so if you have an idea of how doing this (or another way to fix the problem) let me know
Have you tried using “Add Actor World Rotation” instead? Or is this entire actor attached to something? I want to say Add World Rot has correction but I might be wrong. Try slotting that in place of the local rotation node and let us know how it goes! Trying to avoid doing any lengthy if:then statements.
I tried and world rotation does the same thing, I figured a temporary solution by checking if the value is <.-100 or >.100 I just *-1 the rotation value but as you said it would be better avoiding a branch, so if someone has an idea
A branch is incredibly cheap, just about as cheap as it gets, performance-wise it’d be a great choice. Regardless, the way this is typically handled is turning in increments way before 180/-180, not allowing it to get to be so far, so your 100/-100 choice is along the lines of your standard industry use. I just meant if you want to have a bunch of differing levels it could result in a big chain of branches, but it was more of a “limit confusion” than “avoid a branch” thing.