开发者

Java3d: Moving the camera and animating

In my game I move the camera in my KeyBehavior (extends ViewPlatformBehavior) This works fine but I'd like to be able to move the camera in a more fluid way. Currently these moves are about 1 meter each and look like a "step". Any idea how to animate the camera move between the 2 vectors?

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


To solve this I used a transtion Vector and moved the Camera transform in a loop. Works fine. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜