Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

'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

alt text

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?

Product Version: UE 4.7
yaw.jpg (29.0 kB)
more ▼

asked May 14 '15 at 03:23 PM in Blueprint Scripting

avatar image

25 1 6 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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?

more ▼

answered May 14 '15 at 03:56 PM

avatar image

596 31 77 51

avatar image alektron May 14 '15 at 04:08 PM

That doesn't seem to be the case When I try values between 0 and 1 there is just some very little movement as you would expect if it would work with an angle, though I need to press the button 36 times to perform a 90 degree rotation when the value is 1. You should think I'd have to press it 90 times

avatar image SolarVelocity May 14 '15 at 05:26 PM

Yeah, just did some testing, there seems to be a ratio applied to the rotation when using add controller yaw input.

However, I did some testing with set control rotation and this seems to work the way you would like.

alt text

avatar image alektron May 14 '15 at 05:30 PM

Well, guess I'll go with that solution then Thanks a lot

avatar image Charlemagne III Nov 16 '16 at 02:50 AM

The rotation mentioned here is mentioned on this page: https://docs.unrealengine.com/latest/INT/BlueprintAPI/Pawn/Input/AddControllerYawInput/index.html

There is a multiplier set on the controller.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Sep 20 '16 at 06:15 PM

avatar image

243 11 23 104

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question