簡體   English   中英

在我的3D旋轉菜單中反轉y軸(as3)

[英]Invert the y axis in my 3D rotating menu (as3)

我遇到了制作這個3D旋轉菜單的問題。 我的代碼看起來像這樣。

import flash.events.Event;

addEventListener(Event.ENTER_FRAME, onEnterFrame);

function onEnterFrame(event:Event):void
{
    anim.rotationX += ((stage.mouseY - stage.stageHeight/2)-anim.rotationX*20) * 0.009;
    anim.rotationY += ((stage.mouseX - stage.stageWidth/4)-anim.rotationY*20)  * 0.009;
}

但是我不知道如何使y軸反轉,所以movieclip在y軸上相反

有人可以幫忙嗎?

改變這一行:

anim.rotationY += ((stage.mouseX - stage.stageWidth/4)-anim.rotationY*20)  * 0.009;

至:

anim.rotationY -= ((stage.mouseX - stage.stageWidth/4)-anim.rotationY*20)  * 0.009;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM