Get angle from 2 positions(从 2 个位置获取角度)
问题描述
I have 2 objects and when I move one, I want to get the angle from the other.
For example:
I have tried the following and every variation under the sun:
But I just get 2.949023 returned where I want something like 45 degrees etc.
Does this other answer help?
How to map atan2() to degrees 0-360
I've written it like this:
Running the code:
And this returns 45.
Hope this helps.
这篇关于从 2 个位置获取角度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!