x

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/Pitch ignored when managing input from Player Controller

I initially posted this on the forums about 4 days ago I believe. In hindsight I realize it might have been a question better suited for the AnswerHub, and seeing as I haven't gotten any response on the forums I'm giving it a go here. Hope it's ok that it is essentially a copy & paste of the forum post.


So the long story short, I wanted to move input management from the pawn (ThirdPersonCharacter) to the player controller (ThirdPersonController). The main reason is that I intend to allow for two movement modes; direct control of the pawn, or clicking an area on the screen to have the character auto-navigate to the location.

As you've probably understood I used the Third Person template, and as such the same control principles apply: WASD movement, jump on spacebar and mouse controls camera. However, after trying to get the input management on the controller, for some reason it seems to ignore the camera controls.

First of all, screenshots of the two relevant blueprints.

ThirdPersonController ThirdPersonController * Note: I haven't actually implemented the auto-navigation, so the branch has both options pointing to direct movement.

ThirdPersonCharacter ThirdPersonCharacter

Now, the jumping works fine. So does movement. However, the camera controls, implemented via Turn Axis->Add Controller Yaw and LookUp Axis->Add Controller Pitch are ignored. To be certain that it actually registers values on the axes, I also print the values to the screen. It certainly receives values, as whenever I move the mouse the numbers for Turn and LookUp change... it just seems like the Add Controller Yaw/Pitch functions simply ignore it.

I have also tried unhooking the Val inputs on the Add Controller Pitch/Yaw nodes and manually inserted a number. Still, no dice.

Any suggestions? Am I doing something wrong? Is this by design, and there is some concept I have failed to grasp? Or is this a bug in the engine?

For the record, I'm using Unreal Engine version 4.18.3 on a Windows 10 system.

I've also added a video to show how this works (or rather, how it doesn't work) in the game. As you can see in the video around the 7 seconds in, I am moving my mouse and it is registering axis input (as indicated by the debug messages), but nothing happens.

YouTube Video Link: UE4 4.18.3 - Controller vs pawn input issue

Product Version: UE 4.18
Tags:
more ▼

asked Jan 31 '18 at 11:41 PM in Blueprint Scripting

avatar image

Kresjah
20 6 4 9

avatar image exaptations Mar 07 '19 at 09:38 AM

This remains unresolved, and I've yet to find a reliable workaround. If anyone knows how to fix this, please help!

avatar image Nebula Games Inc Mar 07 '19 at 08:21 PM

Is the pawn set to use control rotation yaw/pitch values?

avatar image exaptations Mar 07 '19 at 09:00 PM

In my setup, where I've simply replicated the built-in FPC blueprint: "Controller rotation pitch" is checked off, "controller rotation yaw" is checked on, "controller rotation roll" is checked off. This seems to work fine for a standard FPC blueprint.

All of these settings are found under "Pawn" in the details panel under self. I've fiddled with them and they don't seem to change anything.

Also: I'm using Unreal 4.20.3

avatar image Nebula Games Inc Mar 07 '19 at 09:44 PM

Do you have screen shots of your setup? I can barely see the OP's nodes so if you are doing something similar post some new and improved screen shots.

avatar image exaptations Mar 07 '19 at 10:01 PM

Sure. I'm using a standard FPC blueprint and sending the player's input data both to the player controller and to a remote pawn controller that possesses another pawn. This setup allows me to synchronize the movements of the FPC and the pawn. However, like Kresjah's situation, the pawn controller doesn't recognize my pitch and yaw input:

alt text

Elsewhere in the Blueprint I properly set and possess Pawn 1 .

avatar image exaptations Mar 10 '19 at 03:35 PM

Any ideas? Still haven't figured this out.

avatar image exaptations Mar 08 '19 at 03:30 AM

When I hover over one of the input functions, it says that the function "adds input to the Controller's rotation, if it is a local PlayerController." Perhaps the problem is that Pawn1 is not a local player controller. Could this be it? And if so, how do I work around this?

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

1 answer: sort voted first

Make sure your Input Scale options are >0 in the controller default settings

more ▼

answered Apr 07 '18 at 11:32 PM

avatar image

huklen
6 1 1

(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