Calculating Walk Speed Based On Slope and Direction

brisck1
Fri, 04 Jan 2019 22:04:39 +0000
Character & Animation

So I’m working on movement for my first-person character and I want to slow the player down when travelling up slopes and speed them up when travelling down them.

So far I have discovered that you can get the floor normal from the player character movement component:

Which is great, however my problem is that I need to somehow take this normal and check it relative to my movement direction/velocity (not my facing direction, due to strafing etc.) so that I can determine if I’m going up or down a slope when i’m moving.

This is where my mathematical knowledge falls short unfortunately, so any help on this would be much appreciated!

Thanks.

4 posts - 4 participants