Add Movement Input's scale value is capped to 1 or -1?

The character doesn’t move faster than 1 if it is set to anything bigger than 1.

Even if I change the input value, nothing is changed. If I multiply in it events, nothing. If I just use a float set to something high instead on inputAxis, still the same speed.

Hey Miksu112,

The movement speed of a Character won’t change if the input value is outside of the -1 to 1 range. If you want to change the movement speed, look at the CharacterMovementComponent and look for MaxWalkSpeed. This value will allow you to adjust how quickly the Character moves.

1 Like

The Character class is what has the CharacterMovementComponent. Make sure that your GameMode has the Character set for the DefaultPawnClass.

Changing the MaxWalkSpeed does nothing. And I have set that player controller to the default in the game mode.

You probably set the DefaultPawnClass to the DefaultPawn, which will “fly”.

Here is how to setup a Character:

https://docs.unrealengine.com/latest/INT/Engine/Animation/CharacterSetupOverview/

The player is just flying. Help?

Have you setup your character, as described in the CharacterSetupOverview?

But I have my Character there already, the problem is I can’t change his speed.

Probably. Now I deleted my character to test if creating a new character and redoing everything will work, and now I can’t undo the deletion. No wonder most people use Unity.

Why did you accept this answer as the correct answer? It hasn’t solved anything yet.

The answer is to follow the Character Setup Overview. When I asked if you had followed this, you said “probably”, leading me to believe that you solved the issue before you intentionally deleted it.

What else do you need help with?

This is how you’d adjust Character walk speeds:

Start by setting up the Input, you can do this by going to Edit → Project Settings → Input:

109527-499966_input.png

Next, in your Content Browser, create a GameMode Blueprint class. You can do this by right-clicking in the content browser and choosing, “Blueprint Class”. Left click on “Game Mode”. Name it something, such as, GameMode_BP.

Next, right click in the Content Browser again and make another Blueprint Class, again by choosing, “Blueprint Class”. This time, choose “Character” from the window. Name it something, such as, Character_BP.

Then, double-click on the GameMode_BP and under “Default Pawn Class”, change the drop down to whatever you name your Character Blueprint Class ( Character_BP ).

Next, double click your Character Blueprint Class ( Character_BP ) and select the “Viewport” Tab. Then, left-click on the Mesh and on the right side, under “Mesh”, left click the drop-down for Skeletal Mesh and in that window, left-click on the eye icon that says, “VIew Options”, choose, “Show Engine Content”

109530-499966_enginecontent.png

Then, select, “TutorialTPP”. Then, with the Mesh still selected, move it down 90 units (on the Z Axis), then rotate it -90 degrees on Yaw Axis. Still with the Mesh selected, under “Animation”, change the Anim Class from None to “TutorialTPP_Animblueprint”.

Next, on the top left, add a Spring Arm Component by clicking the Add Component button (in green) and selecting Spring Arm. The, do the same thing and add a Camera Component. Then, when the Camera Component is added, left-click on it and hold, then drag it over the Spring Arm Component.

Next Select the Spring Arm Component and move it where you want it.

With the Character Blueprint still open, select the “Event Graph” tab and add the following:

Lastly, back in the Level viewport, in the “World Settings” tab, change the GameMode Override to the GameMode Blueprint ( GameMode_BP ).

If you press the Play button and then run around, when you press and hold the left-shift key, you will run 4x as fast. When you let go of the left-shift key, you will go back to normal.

Here is a link to download a project doing the exact same thing described:

[https://drive.google.com/file/d/0B_7mVza1uzD5Q2lPTS1jZllRaWM/view?usp=sharing][5]

This is what I needed. Thank you. No wonder I switched to Unreal.

But what if you don’t want to change the max move speed?

What I need to do is simply double the input movement scale, for the input node in the vertical direction, whilst leaving the other input movement node, horizontal, at the normal scale.

If I set the max speed, then they both move twice as fast, which is not what I want at all.

a bit late but you could simply change the max walk speed in a blueprint. when your horizontal movement input is pressed simply reduce the max walk speed and for vertical simply increase it

For anyone still looking for a C++ answer since Unreal documentation is just that bad, here you go:

Get your movement component and set the MaxWalkSpeed to your desired value:

void AYourCharacter::BeginPlay()
{
	Super::BeginPlay();	

	UCharacterMovementComponent* moveComp = FindComponentByClass< UCharacterMovementComponent>();
	moveComp->MaxWalkSpeed = YourMovementSpeed;
}

Then, when you receive your input (horizontal movement here) you multiply with a factor how you want to have this specific movement ( here sideward movement is half the normal walk speed):

void AYourCharacter::MoveX(float Value) {

	if (Value != 0) {
                 AddMovementInput(GetActorRightVector(), Value * 0.5);
	}
}
1 Like