Camera alignment changes although no change was done
3 posters
Camera alignment changes although no change was done
I load a camera from my package. The camera in the package has a rotation. When I now call sio2TransformBindMatrix on the camera's transform the orientation of the camera in the engine changes. I am not completely sure what happens but the object which was previously in front of the camera is no longer visible. Can someone explain to me or give me a hint what goes wrong?
AstAn- Posts : 12
Join date : 2009-08-22
Re: Camera alignment changes although no change was done
You need to change the direction, not the rotation... or simply use sio2LookAt...
Re: Camera alignment changes although no change was done
My point is that I do not change anything at all, just call sio2TransformBindMatrix on the transformation.
So is sio2TransformBindMatrix the wrong function then? Does the camera update itself automatically during the render and frustum functions that I call for it?
So is sio2TransformBindMatrix the wrong function then? Does the camera update itself automatically during the render and frustum functions that I call for it?
AstAn- Posts : 12
Join date : 2009-08-22
Re: Camera alignment changes although no change was done
Yes. Generally you don't have to call SIO2TransformBindMatrix for a camera object. sio2->_SIO2camera->_SIO2transform->loc->x will move it without a call to SIO2TransformBindMatrix.
mordenkaim- Posts : 21
Join date : 2009-05-19
Re: Camera alignment changes although no change was done
Thanks, it is working now but not completely as expected.
When I rotate the camera around the object horizontally, everything is fine. When I do it vertically, the object starts to move into the distance. The distance of the camera towards the object is always the same so it must have something to do with the camera's projection. I was wondering where the up vector of the camera is stored. Maybe this is what causes the problem.
When I rotate the camera around the object horizontally, everything is fine. When I do it vertically, the object starts to move into the distance. The distance of the camera towards the object is always the same so it must have something to do with the camera's projection. I was wondering where the up vector of the camera is stored. Maybe this is what causes the problem.
AstAn- Posts : 12
Join date : 2009-08-22
Similar topics
» sio2UnProject change in 1.4?
» SIO2widget change in 1.4?
» How to change the scene?
» Randomly change one's position or what?
» Camera Rotate Y
» SIO2widget change in 1.4?
» How to change the scene?
» Randomly change one's position or what?
» Camera Rotate Y
Permissions in this forum:
You cannot reply to topics in this forum