Download

How does input work in the Blank Blueprint template?

I’m trying to understand how to set up input to make the player move around.
When I create a new project with the Blank Blueprint template and hit play, I can move the camera around using WASD or my mouse.

  • What exactly is going on here? Where is it implemented to create a camera and put it at the location of the PlayerStart object when the game starts?
  • Is there a blueprint with all the input functionality that I’m not seeing? Where is it implemented to move the camera forwards when I press the W key?
  • Suppose I want to additionally make the camera rotate when I press the R key, where would I implement that? There are no input bindings set up for the existing inputs and the camera is created after I hit play. So how can I move this camera around from a blueprint?

The default game mode is using the default playercontroller, pawn, hud (etc.) classes, those default ones are made in C++.

Is there any reason why you are using the blank template? there are plenty of examples on how to setup input and basic movement in the other templates (first person, thirdperson, top down etc. etc.).

That’s what I was suspecting. I was just confused because it’s called Blueprint template, and yet the controller and pawn classes are written in C++.
Another point of confusion: What is the difference between EnableInput and Possess? Why not just always use EnableInput? Is the difference explained somewhere?

Possess attaches a controller to a pawn. And Enable/Disable input actually enables or disables your control input (keyboard, mouse, gamepad, etc).