I have 2 Problems. If i use the Blueprint without the -1 float component, the Camera turn 30 degrees (in the opposite direction) with the first Keypress and with the second Keypress it turns back to it’s previous position. Because the set Base Orientation and Rotation Offset subtracts the value it gets from the base value. 0 - (-30) = 30 (that’s why the opposite direction), but somehow the next value, will be 0 again, thats why it gets the previous position after a second input.
That’s why i added the -1 component. It works as long as the Head Mount Display Yaw is 0, if it’s not 0, the value will differ from 30 degrees. For Example if my HMD Yaw is -60 Degrees and i press Q, the camera turn to +90 Degrees, because of the -1 component.
Can someone help with this? I am completly desperate about this and have no idea how to solve it.
NewYawDegree = CurrentYawDegree - 30;
if (NewYaw < 0.f)
{
NewYaw = 360.f + NewYaw; // NewYaw is negative here so minus is calculated
}
CurrentYawDegree = NewYawDegree;
If PositiveOrNegativeChangeValue can be higher than 360 or lower than -360 normalization could be done in while loops. Shown here in a more condesed way:
You need the nodes +, -, <, >, <=, >=, branch (for the if), and WhileLoop. I have no to solve it for you and make a screenshot, but it should be super easy or at least good practice if you really wanna work with UE4.
I just thought it might be even easier if you just use Add Controller Yaw Input and give it the value 30 or -30. Should do the job on a Pawn or Character.
Try to figure it out, this is where proficiency is comming from thumbs up
I’m still having the Problem, that my values are extremly weird, eventhough i have 30 degree turns, my camera turns like 100 or 120 degrees per Key press.
First, i’m sorry for no reply. Haven’t seen your solution. Second i’m a little busy at the moment and don’t have my hands on the Oculus right now. I’ll try this next week when i can work with the Oculus again. But thanks in advance, this looks promising
Argh I corrected a typo and then all the green was gone. I took that chance and extracted the comment as answer. Maybe you can accept again? I did not expect this to break the mechanism sorry.