Announcement

Collapse
No announcement yet.

Slow pawn based on steep ground gradient

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?


    #2
    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...

    Comment


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

      Code:
      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.

      Comment

      Working...
      X