Download

Reduce speed if moving backwards

Hi all

I’m trying to set up my blueprint so that if a player moves backwards, the movement speed is lower than if the player is moving forward. Below is a screenshot of the blueprint:

Please note that I need this to work on controller as well as mouse and keyboard.

If any clarification is required, please let me know and thank you for any help.

Cheers
Matt

Probably just another check seeing if the axis value is - or not, and if it is divide the axis value by a number.

Thanks, that makes sense. Excuse my ignorance - what kind of nodes would I need to achieve that? I was trying to find something that would work but I could not find it.

Get the dot product of the characters forward vector with his velocity normalized. You’ll know hes moving backwards when its close to -1. :upside_down_face:

Here is a quick way of doing what you want.

That is just based on your input, if you want to do it based on your characters location/velocity and rotation you would want to use a DOT Product.

This is better. This way if you add a sprint function or a crouch function it will adapt to whatever your default walk speed is.

So this way when you sprint or crouch you can set that new default walk speed and when you walk backward it would work correctly for each movement.

This helped and it’s working, thanks!!