Page 1 of 1

Position my Maya Camera [SOLVED]

Posted: Thu Jan 19, 2012 5:14 pm
by TJBaldy
Thought it would be simple enough but my code doesn't work.

This is what I've got;
if(maya_camera)
{
maya_camera->setPosition(core::vector3df(4000,4000,4000));
maya_camera->setTarget(core::vector3df(target));
}
The idea is to be a "from sky view" camera looking at my level. It's probably really easy and I'm being stupid...

Thanks in advance :D

Re: Position my Maya Camera.

Posted: Thu Jan 19, 2012 5:21 pm
by smso
The camera 's up vector should lie on the horizontal plane for it to look down from above.

Regards from smso

Re: Position my Maya Camera.

Posted: Thu Jan 19, 2012 5:24 pm
by TJBaldy
Well I thought setting my target to my node (3D model on the level) would make the camera look down towards it. Instead, the camera just positions itself next to the node and doesn't start in the sky looking down.

And could you elaborate on your comment please?

Thanks, Tom

Re: Position my Maya Camera.

Posted: Thu Jan 19, 2012 5:34 pm
by hendu
The Maya cam is weird like that, you can't control its precise position. It picks a position based on the target and zoom.

Re: Position my Maya Camera.

Posted: Thu Jan 19, 2012 6:22 pm
by TJBaldy
hendu wrote:The Maya cam is weird like that, you can't control its precise position. It picks a position based on the target and zoom.
Thanks, your advice fixed the problem. I've just changed the maya camera to a FPS camera and now my code works exaclty as I wanted :D.

Kudos!