【发布时间】:2014-03-02 18:08:15
【问题描述】:
如何让我的角色扫射?他总是面对鼠标
this.rotation = Math.atan2((stage.mouseY - this.y), (stage.mouseX - this.x)) * 180/ Math.PI + 90;
如何让他按住一个键时向左扫射?
if(leftKeyDown)
{
if(!this.hitTestObject(_root.container_wall))
{
gotoAndStop(2);
//WHAT TO TYPE HERE?
}
}
【问题讨论】:
标签: actionscript-3 rotation mouse direction trigonometry