Problem with slope angles
Hi, thanks for passing by! So i've begun setting up blueprints in order to get quakelike 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.
(comments are locked)

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.
(comments are locked)

Follow this question
Once you sign in you will be able to subscribe for any updates here