Checking slope angle the object is standing on?

How can I get the angle of the slope an object is standing on?


The angle can be computed from the collision normal (assuming you have it available). For example, if +y is up, the angle can be computed as follows (untested):

float angleInRadians = Mathf.Acos(Mathf.Clamp(normal.y, -1f, 1f));