How to use a Player Controller to move Simple/Default/Basic pawn

3 Blueprints:

1.JustDessertsGameMode

2.Player1_Controller

3.Player1_Pawn

The settings for the GameMode:

The settings use Player1_Controller and Player1_Pawn as the Controller <—> Pawn relationship

Next the Controller’s setup:

It takes input that is setup in the the Input section of the project’s settings:

For some reason I wasn’t easily able to add those “Add Movement Input” nodes unless I unchecked “Context Sensitive” from the menu. Am I to assume that that specific node actually doesn’t make any contextual sense to exist under the Player1_Controller object?

Lastly the Player1_Pawn object is empty save for what I am guessing is a proper mesh+camera setup:

The Controller is commanding the pawn to move but it just isn’t working no matter what I do. I spent 8 hours of my life trying to figure this out but searching has been very difficult. For the love of god someone please save me I’m about to lose it.

I think instead of using ‘get controlled pawn’ (which its target is a controller not a player), you’d better to first cast to the pawn. It seems engine can’t read the pawn corresponding to the controller from your controller graph. Here take a look at this instance. Note that I have cast to the player character not a pawn, but the approach is just the same.
If I were you, I would have created a new controller for the pawn. For cases in which for example your character can enter the tank, then you could just attach the player to the tank, then disable the player controller and enable the pawn controller (which here is the tank).

I hope this will work.

An easier (but not professional) way is to just go inside your character BP and refer to the action buttons from there.

Regards

Thank you for your response navid, I’ll check your layout tomorrow, the following images show some debugging info with Get Controlled Pawn:

http://i.imgur.com/Ldo1mlT.png

http://i.imgur.com/NPMFSR5.png

http://i.imgur.com/KV9tlhq.png

The settings for the Pawn are above, in case its important.

you need a movement component, and you should set the static mesh as the root component, replacing the default scene root. try adding a floating pawn movement component, and enable simulate physics on your static mesh.

1 Like

This is the correct answer, my tank is now flying around the map in a beautiful display! Its movement is set by the controller setup I created. Thank you very much Scott Spadea.