x

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"

Stop GameMode from spawning Pawn and PlayerController on Play

Hello, I am new to unreal engine but have good unity and C++ experience so bear with me.

I have created my own PlayerController blueprint as well as my own Pawn blueprint containing a single Static Mesh component, however whenever i press 'Play', a new PlayerController, Pawn and other things are spawned and used instead of my things.

I believe these are being created by the GameMode, so I created my own GameMode too, however there does not seem to be an option to set PlayerControllerClass or Default Pawn Class to 'none'.

Is there a way to do this? Or is it mandatory by design? If so, why is that?

Product Version: Not Selected
Tags:
more ▼

asked Mar 25 '14 at 10:31 PM in Using UE4

avatar image

miracle7
278 16 23 30

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

5 answers: sort voted first

override GameMode's SpawnDefaultPawnFor, return null Actor, then no default pawn spawns.

more ▼

answered Oct 18 '16 at 10:20 AM

avatar image

wellbye
91 1 5 7

avatar image nitosouji Sep 04 '17 at 08:28 AM

Have you noticed you saved a human life?

That's me! ( • ̀ω•́ )و☆

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi miracle7,

'None' is not an option, but you should have no trouble using the classes of your choosing. In your GameMode Defaults, all you need to do is select the Pawn and Player Controller classes that you want to use, and then in the World Settings, ensure that your GameMode is being used.

I hope this helps

more ▼

answered Mar 30 '14 at 11:08 PM

avatar image

Stephen Ellis ♦♦ STAFF
11.5k 322 32 480

avatar image miracle7 Mar 31 '14 at 12:55 AM

Thank you for that, I guess as a workaround I can make an empty controller and pawn for the game mode to spawn, hopefully that doesn't have any nasty side effects. If it becomes a problem i will just ask another question, cheers :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Sorry to resurrect an old post, but the most streamlined implementation(That I've found) to achieve this goal is override GetDefaultPawnClassForController. Which is called by the engine implementation of SpawnDeafultPawnFor and SpawnDefaultPawnAtTransform.

more ▼

answered Jan 08 '18 at 06:25 PM

avatar image

Aakrasia
206 9 18 18

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

override GameMode's SpawnDefaultPawnFor, return null Actor, then no default pawn spawns.

more ▼

answered Oct 18 '16 at 10:21 AM

avatar image

wellbye
91 1 5 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

This seems to work:

alt text

more ▼

answered Nov 15 '17 at 02:11 PM

avatar image

Samuelb
283 9 19 22

avatar image Samuelb Nov 16 '17 at 12:27 PM

Its worth noting that this caused an issue when trying to respawn the players after death..

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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