簡體   English   中英

Java3d:移動攝像機並設置動畫

[英]Java3d: Moving the camera and animating

在我的游戲中,我在KeyBehavior中移動了相機(擴展了ViewPlatformBehavior)。這可以正常工作,但我希望能夠以更加流暢的方式移動相機。 當前,這些動作每個大約1米,看起來像一個“台階”。 任何想法如何使攝像機在兩個矢量之間移動的動畫嗎?

protected void doMove(Vector3f theMove) {
        // move the main, forward-facing camera
        // get the current location and translate it by the passed in Vector.
        targetTG.getTransform(t3d);
        toMove.setTranslation(theMove);
        t3d.mul(toMove);
        targetTG.setTransform(t3d);
}

為了解決這個問題,我使用了轉換向量,並將Camera轉換循環移動。 工作正常。 :)

暫無
暫無

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

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