Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi, it's me again :) Setting the camera target is great when you wish to track an object, but what if you wish a dumb horizontal / vertical rotation? I tried setting the camera Rot vector, with no result. Is there a function to simply rotate camera, so that target is repositioned automatically? Or is there a general vector function that rotates one Vect3D around another Vect3D (that serves as a center)? |
||||
|
Vect3D has several functions for getting a direction from a rotation. You also could simply set the rotation into a matrix (setRotationDegrees()) and transform a vector (like 0,0,1) with it. Another way would be to use your own camera matrix, if you want to go low level: Simply derive your own class from the CameraScene node and override the render() function, or modify the camera in your scene to change it's render function to be this:
|
||||
|
Thanks for the code. I'll probably rotate a vector. It's a bit misleading that Camera.Rot has no effect whatsoever. Setting it produces no changes in the camera node. |
|