Problem with slope angles

Hi, thanks for passing by!
So i’ve begun setting up blueprints in order to get quake-like acceleration when in slopes. So far, it looks like in this screenshot.

This is on event tick, the variable speed is fed into maxwalkspeed in another blueprint.
So far, whenever my character is on a slope, he gets boosted, whatever the direction he’s going in is. I’d like him to be boosted only while going downwards. I think my method is a bad one. Could anyone help me come up with a better idea?

Thanks in advance.

You can make dot product with (0,0,1) and impact normal I think, to get which angle/slope you have under character feet.

Thanks for trying to help! I know that’s what I need to do, though, the problem is I don’t know how to do that! Could you help me with that?

Thanks! I’ve never done that before, I’ll try and report my results!

Hey! So i tried doing that, but it doesn’t really solve my problem! I can tell if the floor is at an angle but not if the character is moving downwards or upwards, just like before!

Hi,
you will have to calculate the angle of normal vector of plane and a player character.
in current situation, i guess, it won’t be meeting the condition, as rotation will be constant ‘0’ .

let me know if it works.

thanks

yes , exactly !

Although this is an old question, I am posting the solution I worked out.
Basically, subtract the current player position from the last player position and normalize it. That is your movement direction. Now make a dot product between the movement direction and the world up axis (for example (0,0,1)) and this gives you a value between -1(downwards) and 1(upwards). Also works for moving sidewards on a slope which gives you something close to zero (basically not moving upwards or downwards).
I multiply that value with 90 and feed it into a float curve for finetuning the slope factor. For example my float curve points are (time/value) -90/2, -10/1, 10/1, 45/0.5, 50/0.