'Add Controller Yaw Input' weird behavior
Hey guys, I'm recently working an a lock-on system for a first person game and when it came to actually changing the players rotation I discovered some weird behavior of the 'Add Controller Yaw Input' node. It just never did what I expected so I just detached all the other nodes and put a 'Add C. Yaw Input' node right behind the button input for some testing. Here is what happened: Value: 360 The actor did a 180 degree rotation. My first conclusion was that, for some reason, the node might rotate the actor half the value So I tried Value: 180 As expected the actor rotated 90 degree But now as I tried Value: 90 I expected a rotation of 45 degrees but instead the actor rotated -45 degrees (might as well have been 315 degree, can't say for sure) and when I pressed the button again the actor rotated 135 degree so now it was rotated 90 degree compared to rotation I started with. It's a little hard to explain so I'll put an image below that should explain it better
I tried even more values but the results varied and I honestly don't understand what's happening here. Any ideas or am I just overlooking something obvious?
asked May 14 '15 at 03:23 PM in Blueprint Scripting
I would guess that the normal output from an input axis is in the range -1.0 - +1.0 which normally plugs straight into the controller yaw.
Whereas you are inputing an angle in degrees.
You might try dividing that angle by 360 to get a value between 0 and 1?
answered May 14 '15 at 03:56 PM
All of the AddControllerInput functions are multiplied by the PlayerController's relevant scale value. In your PlayerController, look for the settings InputYawScale, InputPtchScale, and InputRollScale. If you set these all to be 1.0, you'll get the behaviour you're looking for.
answered Sep 20 '16 at 06:15 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here