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"

Does Pawn won't accept mouse input?

I have created a Pawn namely MyPawn which inherits DefaultPawn. I have unchecked Add Default Movement Bindings so I can implement my own Pawn movement.

(Please look at my previous question here which is related to Pawn class where exi says MovementComponent is impossible to add via blueprints (and he is absolutely right) that why I am inheriting from DefaultPawn instead of Pawn)

Now the problem is I am able to move Pawn using keyboard input but not with mouse input. Below are my Input bindings, Event Graph


alt text

Event Graph handling Keyboard Input (working)

alt text

Event Graph handling mouse input: (not working)

alt text

As you can see I have binded Mouse X and Mouse Y for looking sides (Turn). This isn't working when I use Look Sides event but works when I use TurnRate (whic hare binded to left and right arrows and game pad)

Is there anything I am doing wrong or something do to with properties or inheritance?

Product Version: Not Selected
input_binding.png (40.3 kB)
mouse.png (65.0 kB)
keyboard_input.png (172.7 kB)
more ▼

asked Jan 06 '15 at 08:50 AM in Blueprint Scripting

avatar image

50 9 15 18

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

2 answers: sort voted first

I found out the issue.

Project Settings->Input-> Mouse Settings-> Use Mouse for Touch was enabled. (this must be disabled)

Thanks for helping me resolve.

more ▼

answered Jan 07 '15 at 05:50 AM

avatar image

50 9 15 18

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

A pawn does by default not receive any keyboard input (because you can have dozens).

You will have to allow it in the defaults of the actor. If you look at the defaults and search for input you can see that it's set to "Disabled". If you have a singleplayer game just set it to player 0.

alt text

Otherwise you might want to get the input in your controller and just pass them down to your possessed pawn.

I hope this helps.


more ▼

answered Jan 06 '15 at 10:59 AM

avatar image

5.9k 291 86 293

avatar image NotReal1 Jan 06 '15 at 02:08 PM

Chaging Auto receive input didnt help. I didnt get what exactly is "get input in your controller and pass to possed pawn"

avatar image Erasio Jan 06 '15 at 02:17 PM

Well I assumed you want to control your player character (or pawn in this case).

Your controller receives input by default and is able to do some other stuff as well.

And most importantly you can get the player character (if pawn or character) without doing the "Get Player Character" since you have to select one which doesn't work too well with multiplayer. There is a node called "Get possessed pawn" or very similar to that which provides you with that variable.

avatar image NotReal1 Jan 06 '15 at 02:34 PM

I might be not clear in my OP. I dint not mention clearly that Keyboard input is working but not mouse input. "Auto receive input" was disabled earlier also but still works with keyboard input but not mouse input. Updated OP

avatar image Erasio Jan 06 '15 at 03:11 PM

Oh what? I'm sorry about that.

Could you try exactly the same in your controller? Just print something to see if it works at all.

avatar image eXi Jan 06 '15 at 03:30 PM

I just tried to recreate your Pawn, but i am able to receive Mouse Input inside a BP that is based on the Pawn class without problems.

Would you mind trying to test this in a new project?

I also tested it with the DefaultPawn class. Still working.

EDIT: Ok wait a second. The normal Pawn class doesn't work. I just tried to print, which is working, but the Yaw Input does not work.

avatar image eXi Jan 06 '15 at 03:53 PM

Ok this seems weird to me. Want to have some else check on this.

For the meantime: Try using Mouse X and Y directly. You will need to multiply the Y value by -1, because overwise it will flip the up and down movement:


If someone else could check this:

  • Fresh BP Project

  • Create a BP of Pawn

  • Use the TurnRate Input or any other input that uses the mouse

  • Check if the Axis Value is something else than 0.0

  • Use the Mouse X and Y directly and check again if the values now work

avatar image NotReal1 Jan 06 '15 at 05:50 PM

I created a new project using Mouse X and Y events. Its working. (I have set axis value to -1 in input binding instead of multiplying it by -1 in bp). I am at home I will test it in problem project tomorrow.

(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