Calculate the angle of the polygon

Hi! I want to know an angle of polygon when I hit him.
When I hit the polygon, knowing its angle of inclination, I want to switch the type of movement (“flying” / “falling”) to “walking”. (CharacterMovement -> Walkable Floor Angle)