【发布时间】:2014-04-12 14:58:15
【问题描述】:
使用 Rajawali 的 master 分支,我可以让我的相机绕轴旋转
mRotateAnimation = new RotateAnimation3D(axis, angle);
mRotateAnimation.setDuration(4000);
mRotateAnimation.setTransformable3D(getCurrentCamera());
mRotateAnimation.setInterpolator(new DecelerateInterpolator(5f));
registerAnimation(mRotateAnimation);
mRotateAnimation.play();
前提是我没有设置 getCurrentCamera().setLookAt(0,0,0)。如果我做 setLookAt,我根本没有旋转。
使用 0.9 版本似乎是等效的
mRotateAnimation = new RotateAnimation3D(axis, angle);
mRotateAnimation.setDuration(4000);
mRotateAnimation.setTransformable3D(getCamera());
mRotateAnimation.setInterpolator(new DecelerateInterpolator(5f));
mRotateAnimation.start();
但这似乎不管 setLookAt() 都行不通。我根本没有旋转。 如果我将 getCamera() 更改为另一个对象,则旋转就像我预期的那样工作。
我错过了什么?非常感谢任何帮助。
谢谢。
【问题讨论】: