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][1] 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

Input:

Event Graph handling Keyboard Input (working)

**Event Graph handling mouse input: ** (not working)

25767-mouse.png

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?

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.

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

I hope this helps.

Cheers.

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.

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

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

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.

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.

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:

http://puu.sh/e9qgB/54cbb9a33f.jpg

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

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.

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.