Why does this Blueprint segment behave differently to this supposedly equivalent Unity C# code?

Hi!

Your logic seems to be correct. Are you sure that you pass correct vectors to it?

I’ve tried to replicate your BP and made an Actor to test it.

I have an Actor BP_AngleTest that has two arrows. It calculates angle between them every tick using your BP logic, and prints result to the screen.


I’ve tested it by moving second arrow, and results seems correct:



So I think that vectors that you pass to the formula are wrong.