I've just started looking at Rajawali and seem to have a misunderstanding of some of the principles.
For example, I have my planet earth sitting at (0,0,0) and I can rotate the camera around it using getCurrentCamera().setRotY(getCurrentCamera().getRotY() + 1)
in onDraw(). This works okay.
However, if I also do a getCurrentCamera().getPosition()
in onDraw() this never changes.
So I suppose my question is how can both these be true? Hopefully someone can explain it to me?
Thanks.
A camera has 3 properties defining it's location and orientation in 3D space: - Position (X, Y, Z) - Rotation (Angle in X, Y, Z axis) - Up (a point "above" position x, y, z)
You can use getCurrentCamera().setPosition(new Vector(100.0, 0.0, 0.0)) to move the camera.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.