Angles of a triangle.. ( Math Question )

So im making a blueprint that uses line traces to be able to measure the angle of a set of stairs
Which essentially leads into questions about triangles and how to do it in Unreal

Things we know about the triangle, b=170, c=400
<A=90
With that i’ve been able to program the code to get a, a=434.626

What math nodes do i need to use in unreal, in order to get the other two angles?
23.025 and 66.975

Or is there possibly a way easier way to take the two points and find the angle… i tried using find look at rotation but it seems to return 2ish degrees and not the actual 68 something it should be ( found by rotating a mesh into place )

TLDR, or to say it all again more simply… How do i get the angle of my stairs when the height is 170cm and the length is 400cm

1 Like

Sometimes the math just slaps you so silly you forget what your doing :sweat_smile:, i had tried almost exactly that but plugged in the wrong values, your solution above does return the 23 degrees expected…

1 Like

I’ll have you know I initially put 170 into Y for some unfathomable reason. :person_shrugging: And was baffled when the result was also correct. It’s late.

tangential (pun not really intended) but might help you.
sometimes for stairs some people add a regular mesh that’s actually just a slope.
if you do a collision test, i think you can get the normal at that point.

you can have both colissions, one as simplified and the other as complex. to drive foot ik as complex.
this is if i’m not mistaken on something.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.