How to use a Player Controller to move Simple/Default/Basic 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.
asked May 28 '17 at 05:37 AM in Blueprint Scripting
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.
answered May 29 '17 at 05:02 AM
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here