Hi,
You can do this with a line trace. First, get actor’s rotation and then it’s forward X vector to determine the direction of Line Trace. Break the Hit result and on a successful hit, the Impact normal will give you the normal vector of the surface. You can then find the angle between your actors forward X vector and this normal by taking the ArcCos of the dot product between these two vectors. The following picture shows its implementation in the Character’s blueprint.
Hope this helps.
–
Please don’t forget to rate this answer if it helped in resolving your issue. Thanks.
