Hello guys,
I’m new in UE4, and I’m having a little trouble with my movement and mouse inputs. So I’m following a tutorial and I’m having a Controller that is receiving the inputs and updating their variables, but when I use cast to get the variables in my AnimBP class they’re 0. I’ve tried printing the variables and got 0. Below you can see my code.
Your Player Controller only exist if you start the Game. Click Play come back to this Window and in the upper toolbar you See Filter. Choose your Character there and it will show up properly.
My problem is that the AnimBP doesn’t receive my input and my character cannot move, even can’t rotate the mouse. I don’t know what’s the problem. Also, in project settings / input I’ve added the needed values, but it’s same.
Rotating the mouse is actually not a responsibility of the AnimBP. You need to set “Use Pawn Control Rotation” to true in your character BP’s spring arm details. And moving your character isn’t done in the AnimBP either. Link your input axis to “Add Movement Input” in your characters BP.
Then in your player controller, something like this should do the job:
If you want your character to orient towards movement, then go to the details tab of your character movement component and check “Orient rotation to movement”