Position my Maya Camera [SOLVED]

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
TJBaldy
Posts: 16
Joined: Fri Dec 02, 2011 3:06 pm

Position my Maya Camera [SOLVED]

Post 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
Last edited by TJBaldy on Thu Jan 19, 2012 6:23 pm, edited 1 time in total.
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Position my Maya Camera.

Post by smso »

The camera 's up vector should lie on the horizontal plane for it to look down from above.

Regards from smso
TJBaldy
Posts: 16
Joined: Fri Dec 02, 2011 3:06 pm

Re: Position my Maya Camera.

Post 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
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Position my Maya Camera.

Post 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.
TJBaldy
Posts: 16
Joined: Fri Dec 02, 2011 3:06 pm

Re: Position my Maya Camera.

Post 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!
Post Reply