Download

Slow pawn based on steep ground gradient

Wondering if there is anything native in the code to handle slowing down the pawn’s movement speed when climbing a steep gradient?

There is already Floor (a vector) in the Pawn class, which is kept updated when in walking physics, which appears to be ground normal.

I just need to figure out how to apply the player rotation to determine whether they are going up or downhill…

For anyone interested. This was kind of obvious once I started playing around:


Floor dot vector(Rotation)

This in my pawn’s Tick() gives me a float value -1 to 1. -1 indicating a full vertical slope uphill, and 1 indicating downhill.