Search the Community
Showing results for tags 'roll'.
-
Hello simple example where roll are not applyed to camera rotation in unigine script Player P; P = engine.game.getPlayer(); P.setWorldRotation( P.getWorldRotation()* ( //quat(rotateX(5))//pitch - ok //quat(rotateY(5))//yaw - ok quat(rotateZ(5))//roll? not working ) ); what wrong here? how to make camera rolling?
-
[SOLVED] Examples on Player.setUp or setModelview to "roll" the camera (psi angle)
koshman86 posted a topic in General
Hello, I'm having troubles with setting the camera "roll" rotation (like a spinning airplane), or (it's equivalent) setting arbitrary camera Up direction. Are there any examples on it? The problem is, I made a camera flying round the Earth, and I set direction of radius-vector as Up direction using PlayerSpectator.setUp(). Camera is moved by (camera)Node.setPosition(). At certain positions (e.g. 1000;0;1000), I get camera suddenly "reversing" backwards, and if I keep pressing "forward" it reverses again, and again, so moving like stairsteps (shifting slowly up or down). As I found, there appears some exchange of x<->z coordinates of camera. I tried to catch the change, and it seems to happen outside my code. When I remove setUp(), the "reversing" vanishes. I also tried to use PlayerSpectator.setModelview() (seems to have no effect), and (camera)Node.setRotation() (only sets direction and fails to roll the camera).