FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Camera alignment changes although no change was done

3 posters

Go down

Camera alignment changes although no change was done Empty Camera alignment changes although no change was done

Post  AstAn Tue Sep 15, 2009 4:40 pm

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

Back to top Go down

Camera alignment changes although no change was done Empty Re: Camera alignment changes although no change was done

Post  sio2interactive Tue Sep 15, 2009 5:07 pm

You need to change the direction, not the rotation... or simply use sio2LookAt...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Camera alignment changes although no change was done Empty Re: Camera alignment changes although no change was done

Post  AstAn Wed Sep 16, 2009 1:06 am

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?

AstAn

Posts : 12
Join date : 2009-08-22

Back to top Go down

Camera alignment changes although no change was done Empty Re: Camera alignment changes although no change was done

Post  mordenkaim Wed Sep 16, 2009 5:29 am

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

Back to top Go down

Camera alignment changes although no change was done Empty Re: Camera alignment changes although no change was done

Post  AstAn Wed Sep 16, 2009 2:38 pm

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.

AstAn

Posts : 12
Join date : 2009-08-22

Back to top Go down

Camera alignment changes although no change was done Empty Re: Camera alignment changes although no change was done

Post  sio2interactive Wed Sep 16, 2009 5:06 pm

Just use sio2LookAt...
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Camera alignment changes although no change was done Empty Re: Camera alignment changes although no change was done

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum