Scalable player movement speed

Are you multiplying your axis input by another float?

The analogue input gives me variable movement speed. Im just wondering if your input is being multiplied by a another float that is so high it just means the input is maxed at all times?

Im only guessing though, im only a beginner myself. Sorry i cant offer more specific advice…

Please excuse me if this is obvious and I’m just not seeing it.

I’m using Blueprint Scripting to create a Third Person Parkour/Action game with locomotion comparable to the Assassin’s Creed games, and I’m trying to apply the degrees of input from a controller to scale the movement speed of the character.

I created a breakpoint on the InputAxis MoveForward Node, and it is reading the degrees of input on the axis, but as the default MyCharacter Blueprint is right now, the character in-game does not respond to the different degrees. Instead, he just treats any input as a full toggle of speed in the correct direction.

This is probably some checkbox somewhere, and I’m just blind for not being able to find it, but I just cannot figure it out.

Thanks guys!

I’m using the default 3rd person controller BP, so I don’t think there are any unusual multiplications going in there.

I’ve also tried cranking the sensitivity of the controller axis down to 0.01 and up to 30, and it doesn’t make a difference. I’m pretty sure somewhere in the blueprint or project settings the movement vector is just getting run through some kind of “round up to 1” function.

I believe you’re asking for something similar to a throttle system. Where they player begins to walk then accelerate to a run. If so, I’m working on something like that as we speak. Once I find a good solution, I will make sure to share it here.

It might be worth using the print function to show your axis value. If it only shows 1, 0, or -1 when you are playing then you at least know that’s what the engine is reading and its not reading the in between values.

I have a similar setup for my flight game and i definitely have analog turning and rotation. a slight push on the stick turns me slowly and a full push turns me faster. At least that’s how i feel its working. Ill double check this afternoon when i get home from work.

Again though im a beginner just learning myself so apologies if anything i say leads you down the wrong path.

I have also experimented with that, and apparently the whole AddMovementInput() func altogether does not really care about the magnitude of it’s Scale argument, it only cares about positive/negative values, setting the direction. It is really a flaw, because it’s argument list and documentation clearly state that the function can and should set the movement speed, not just direction.

Let’s wait for an official answer. I would also like to hear a workaround for this.

I’m using a Keyboard, and it returns 1 / -1. I assume its obvious that a keyboard can’t have a middle point, but I still be there should be a way to exponential way to change speed.

I’m using an Xbox 360 USB controller, and I can see that it’s returning decimal values, which is exactly what I want, but no matter how slightly I tilt the thumbstick, the character will start moving full speed, whereas what I’m looking for is a way to move slowly with a slight tilt of the thumbstick, and gradually move faster as the thumbstick is tilted more.

Do you think that the same problem would happen if I went the straight-up coding route? I’m no programmer, but it might just be quicker for me to figure out the movement scheme in the scripts if it’ll work.

I am actually doing it in Cpp, with the same results that you have. As far as I investigated engine code, we will have to rewrite couple of functions responsible for player input and physical stuff applied to Pawn. I would like to find other solution, cause I am pretty sure that guys from Epic did not just forget to finish the AddMovementInput(), and there is something else that we don’t understand. Or it will be fixed soon, at least.

Let me clarify things a little. Here is the member function of the custom character class, which is inherited from ACharacter (child of Pawn). It is a standard func for a first person cpp template

The thing which actually applies an input to the Pawn’s position is AddMovementInput(). Here is it’s definition:

3739-trywryry.jpg

It accepts direction and magnitude. However, the magnitude does not have any effect, except for a negative/positive value, which change the direction. Thus, I can only let pawn move into direction with some constant speed, not faster, not slower.

Full support for analog movement within CharacterMovementComponent (and FloatingPawnMovement) didn’t make it to release, but is in the most recent code and should be in the next release.

It looks like you’re setting things up correctly, just that internally the code in UCharacterMovementComponent::ScaleInputAcceleration() was normalizing the input vector. You may be able to work around it for now by scaling the max speed and acceleration based on the final magnitude of the input vector.

On a keyboard there isn’t an analog value (it is just 0 or 1), so in that case you might want to look at changing the acceleration to be lower, or implement another way of controlling the max speed (such as holding shift to increase it for sprinting).

Cool. In that case, I can’t wait for the next release!

Hey Shrodo,

So by changing the Max Acceleration in the Character Movement the character goes from a walk to a run. I tried 150 which was a nice smooth change but feel free to experiment. But I also want to provide a solution for smoother turning as well. I’ll let you know once I figure that out.

Update:
Try Use Controller Desired Rotation within Character Movement and see if that affects the way you turn using the Controller.

Peace

Note that there is a difference in the Input settings between “Gamepad Left Stick Left” and “Gamepad Left X”.

"Gamepad Left Stick Left" returns 1 or 0 depending on whether or not the analog stick is tilted left. 1 means you are tilting it left, even if the stick position is .001 left.

"Gamepad Left X" returns a range of values between -1.0 and 1.0 depending on how far left or right you are tilting the analog stick on the controller.

Sounds like you want to be using “Gamepad Left X”, not “Gamepad Left Stick Left”.

This actually solved my problem! It’s a minor slip up but I somehow missed it :slight_smile: Thanks!

Umm hi Guys I am a total noob in ue4,12 so i need ur help everyone if ur still there plz go to this page and help me out Parkouring System For Unreal 4.12.4 - Character & Animation - Epic Developer Community Forums
i need somewhat of parkouring if u can resovle any of the following issues that i have that would be appricated