![](/img/trans.png)
[英]Java3D - Is it possible to have a viewingPlatform that tracks a moving object
[英]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.