AS3 旋转按钮,但不点击
我正在尝试旋转程序中具有大点击框的按钮。显然,当我这样做时,命中框也会旋转并且现在位于错误的位置。是否有可能让这个命中框保持静态,或者只是将其保留在那里?
var turnButton:Tween=new Tween
(sections.lower, 'rotation', Strong.easeOut, 0, 180, 3, true)
谢谢
I am trying to rotate a button in my program that has a large hit box. Obviously, when I do this, the hit box is also rotated and is now in the wrong place. Is it possible to get this hit box to remain static, or to just keep it there?
var turnButton:Tween=new Tween
(sections.lower, 'rotation', Strong.easeOut, 0, 180, 3, true)
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,不是真的,但是有解决方法。您可以将点击区域设置为一个圆(这是旋转不变的),并将其设置为旋转的枢轴是圆的中心。如果您能给我提供有关正在发生的情况的图像,我可能会提供更多帮助。
Well, not really, but there are workarounds. You can set the hit area as a circle (which is rotation invariant) and set it so the pivot of the rotation is the center of the circle. If you could provide me with an image of what's going on I could be of more help though.