Character not moving and game spawns two characters

Hello, I am currently trying to get a character to move when I click the mouse button to where ever the mouse was clicked at. I copied everything in the top down template to try to get my character set up so I can begin prototyping. I’m encountering two problems whenever I play in editor.

1: The character wont move despite copying everything. (Character is set up as the Blueprint Character, controller is set up as TopDownController, etc.)

2: When I spawn in editor, the are two player characters.

Anyone know why it might be doing this? I’ve been trying to figure this out for the past day now but I can’t figure it out, any advice would be appreciated

We need screenshots of your playercontroller and character.

Now a reason why it might be spawning 2 characters is you have 2 characters selected in the arrow bside the play (PIE) button. More likely its beause your level/map/scene doesnt have a player start. Add one from the basic componeonts menu on the left its calleed player start.

your character, if not using a player controller should use the “move to” node just like in the top down template. If using a player controller you probably need to put the move to logic in the player controller blueprint istead of the character hence 'player controller;. that controls/is for controls from the player. The character is just to setup the character like meshes maybe health or something.

If this cleared it up for you dont forget to accept an answer so people can find the answer they needed when searching/googleing later.

Also one major problem probaly causing every problem is your gamemode is set to “None” in world settings. You need a gamemode. That sets your player controller, default pawn/character, HUD etc. Make a new blueprint class of type gamemode and call it “GM_testing” then in the world settings where in your picture it says none select GM_testing and under the drop downs select the blueprints you want for default pawn, player controller, spectator pawn etc.

You need to do that for every map, you an also set a single player or server default under projet settings → maps and modess

Hope that helps :slight_smile:

Sure, here you go: Here’s both the screenshots of the playercontroller, it compiles with no problems.

There are no blueprints for the player character though, because I copied straight from the Top Down Template which doesn’t have code in the player character.

Also: Gamemode, it’s set both in Maps and Modes and world settings to DungeonCrawler, which is the mode I’m using, which doesn’t fix it.

THe trace channel is set to visiblity. Is the meshes in the level set to block visiblity traces under collision?

Also try plugging the false in the branch in the top picture to see if thats causing the issue (its thinking your clciking too close to the character maybe).

Also you need a character to control with hte palyer controller. And it has to have a defautl character movement component otherwise it wont move.

  1. Yes, it’s set to block visibility traces under collision
  2. Tired plugging in false, doesnt do anything
  3. The player controller should be controlling the character I have in the game already, it has movement capabilites and everything

Can you test by adding test strings into the moveement and lookUp/LookRight execution chains at the end, better yet print the axis values as well right after a verification message.

Lastly is your level set to the gamemode that has your character and player controller set in it? If your gamemode is set to default or something else in your level/map/scene it wont be using them. You can verifiy this under windows-> world settings and expanding gamemode. It should be something other than None or GameMode something like GM_myCustom_gm

Edit: Also add debug strings to the simple move to, that way you know if they are executing or not. You can also add a print string to the false execution that prints “Clicked too close”

Have you tried GetPlayerController → setEnableClickEvents = true in EventBeginPlay() in your player controller? THat could be the cause of all the issues, its not accepting click events :lol:

I also see you have alot of default values changed like the crosshair and show cursor. Try setting those back to default.

Otherwise all I can suggest is copy the blueprints by hand 1 node by 1 node by hand from a fresh template with the click to move setup.

You can try setting the default click trace channel to camera too. Also for hit events to fire you need physics enabled I beleive and/or have “Enable Hit events” so makes sure those are setup under physics.

9/10 times for these problems its 1 stupid checkbox or one stupid setttings off the player controller or something.,

Heyo, back again. I narrowed the problem down. I decided to just work straight from the Top Down Template. It has something to do with the floor the character moves on. The starting floor is good to walk on but when I spawn another cube the character, again, refuses to move. Any clue to what might be causing that?

Go to your “World Settings” under the “Settings” option in menu above. Check the “Game Mode” settings, change the “default pawn class” here to “None”. This will then spawn only one character

1 Like

Edit guys: Found the problem, there was something called navigation mesh that I needed, it needed to be inside the navigation mesh in order to work.

I also meet this issue and finally fix it. Hope it works for you.

All you need to do is set the Auto Posses option in the AI section of the character that is already in the scene. Change it to player 0 and it should be good.

To anyone reading, please do not do this.

That’s a worse idea than using the flipflop with a branch to see if it’s a or not.