Actionscript 中从 3d papervision 对象到 2d 对象的 360 度旋转
出于某种原因,我已经为此苦苦挣扎了一段时间。
我有一个纸视觉相机,它使用键盘输入来转动,我有一个雷达,我想在相机转动时将其定向到方向。
除了将我的(相机)DisplayObject3D.rotationY
正确映射到RadarInterface.rotation
之外,我还可以正常工作。
相机(或任何 3D 对象)使用我发现很难的值: 顺时针方向:0 到 89、89 到 0、-0 到 -89、-89 到 -0
完成完整的 360 度
旋转。因此,如果我要旋转 180 度,我会从 0 度旋转到 90 度,再次回到0。
有谁知道如何将其转换为 360 度。
提前致谢。
Some reason I've been struggling with this for a while.
I have a papervision camera of which turns using keyboard input, I have a radar of which I would like to orientate to direction when the camera turns.
I have it all working apart from mapping my (camera) DisplayObject3D.rotationY
to RadarInterface.rotation
correctly.
The camera (or any 3d object) works with values I'm finding hard:
Clockwise: 0 to 89, 89 to 0, -0 to -89, -89 to -0
doing a complete 360.
So if I were to turn 180 degrees I'd go from 0 to 90 and back down to 0 again.
Does anyone know how to convert this to 360 degrees.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不太清楚你给出的这些数字是如何运作的。过去,由于闪光灯将 270 度更改为 -90 度或类似原因,我遇到过物体旋转不正确的旋转问题。下面的陈述多次帮助我解决这个问题;它将范围从 0 到 360 更改为 -180 到 180。
您是说 45 度会返回与 135 相同的值吗?
It isn't exactly clear to me how these numbers you have given would work. In the past I've had rotation problems with objects spinning incorrectly due to flash changing 270 to -90 or something like that. The statement below has help me with this a few times; it changes the range from 0 to 360 to -180 to 180.
Are you saying that 45 degrees would return the same value as 135?