Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

3 Blueprints:

alt text




The settings for the GameMode:

alt text

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

Next the Controller's setup:

alt text

It takes input that is setup in the the Input section of the project's settings: alt text

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: alt text

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.

alt text

Product Version: UE 4.15
more ▼

asked May 28 '17 at 05:37 AM in Blueprint Scripting

avatar image

3 1 2 4

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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.

more ▼

answered May 29 '17 at 05:02 AM

avatar image

9.5k 317 204 449

avatar image Dynasoul May 29 '17 at 11:20 PM

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.

(comments are locked)
10|2000 characters needed characters left

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

alt text

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.


capture.png (98.9 kB)
more ▼

answered May 28 '17 at 07:21 AM

avatar image

966 28 14 46

avatar image Dynasoul May 28 '17 at 07:42 AM

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

alt text

alt text

alt text

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

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question