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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

First Person Character + Controller, can't make it move with WASD

Basically after 3 days of trying, I finally got my character to respond to mouse movement, but it still won't move. Steps I've taken -

1) Tried moving the GameMode, Controller, Character from a FPS template - Did almost nothing

2) Made my own stuff using this - https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/SetUpInput/Blueprints/index.html

3) Changed a lot of settings based on answers I found, such as auto possess character on the FPS Character, which made it respond to the mouse, but not to moving with the keyboard

I'm also generally confused about why there are 5 different things required - Controller, Character, GameState, GameInstance, PlayerState, GameMode.

I'm also disappointed that I couldn't find a clear explanation of what these 5 things do. My current understanding is that the GameMode specifies what spawns, and the Controller possess the Character. But the Character is the one which has the blueprints for input, which is confusing. Because I read that the Controller takes input, not the Character.

Also there's no step by step to simply get a moving character in your game. The link I followed SHOULD have worked, but it didn't. I had to change more settings than stated there to even get it to respond to mouse movement.

Just to add, I'd be more than happy to try using C++ as well. I followed some other tutorial that explained a FPS game from scratch, but every single block of code was followed by "Since 4.6, this no longer works, do this instead + this too" and that additional code gave me errors.

Product Version: UE 4.11
Tags:
more ▼

asked Apr 03 '16 at 10:40 AM in Blueprint Scripting

avatar image

Dyonisian
3 1 2 5

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

2 answers: sort voted first

I understand your frustration, UE4 can be daunting at first approach.

Ok so at the very base, imagine you create an empty project.

You need 2 things minimum. A GameMode, so that you can set a different player pawn. A controller to control your player. But as you have noticed, you can control the character from within the player pawn.

So if you start with a level with a light, floor etc., create a new game mode, then a new character as player pawn. So you go, new blueprint, character, and call it "PlayerCharacter" for example.

Assign that character to be the player character within the game mode (it's best to do so in the project settings / maps and modes)

So at the begin play, the game mode is spawned, it will spawn all its sub classes with it. The Character is spawned by default at the Player Start Object.

From there you need input. So you go into Project Settings / Input, Create a new Axis. Call it ForwardAxis for example. Assign the letter W to it and the letter S. Set the W to 1.0 and S to -1.0.

To hook up the axis you can either do it in the controller, or the character itself. For the sake of simplicity, let's do it in the character.

You hook up the axis coming from WS to the control's rotation forward vector and into the scale value. That gives you movement forward and backwards. Then repeat the same process for a new Axis of AD in the input settings.

For hooking up the movement from the controller, you need an additional step. Creating a Player controller for the Game mode to use. And instead of affective the move directly, you use "get controlled pawn" which is the character possessed by the Player Controller.

By setting the Player controller and Pawn and Game mode in the settings, it automatically spawns them and possess the pawn.

Hope this helps :)

From Character: alt text

From Player Controller (either one or the other): alt text

more ▼

answered Apr 03 '16 at 11:19 AM

avatar image

keyle
1.8k 65 27 89

avatar image Dyonisian Apr 03 '16 at 12:02 PM

So if I do the first one, I don't need a controller? Or I just use the default controller? I'll give this a try but I'm fairly certain I've already done all of this. If you wouldn't mind taking a quick look at this - https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/SetUpInput/Blueprints/index.html Its pretty much what you mentioned. This didn't actually do anything for me - I think I changed the setting of the character to "Auto possess Player 0" and it started responding to the mouse, but not to WASD. Thank you for your help

avatar image Dyonisian Apr 03 '16 at 12:03 PM

Can you think of any other settings that might be interfering with this? I'm using a project thats from a tutorial, so I didn't make it. And I started this level from one that was already there. If I start a new FPS template, it works there.

avatar image keyle Apr 03 '16 at 11:39 PM

If you have the Axis value hooked up somewhere else, it can interfere with it (because it's constantly providing value). Make sure you only have one set of the Axis at any one time, in one blueprint.

Otherwise it's as straight forward as I wrote above. I can't help you about tutorial examples, I just don't know what they stuffed in there :)

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

For those of you that make heavy use of shortcuts in your workflow: I had to disable my autohotkey script for input to work.

more ▼

answered Feb 09 '18 at 08:00 PM

avatar image

MakeGamesHappen
1 1 1

(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