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
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.
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.
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 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.