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.

Position my Maya Camera [SOLVED]

Postby TJBaldy » Thu Jan 19, 2012 5:14 pm

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

Re: Position my Maya Camera.

Postby smso » Thu Jan 19, 2012 5:21 pm

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

Regards from smso
smso
 
Posts: 217
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Position my Maya Camera.

Postby TJBaldy » Thu Jan 19, 2012 5:24 pm

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

Re: Position my Maya Camera.

Postby hendu » Thu Jan 19, 2012 5:34 pm

The Maya cam is weird like that, you can't control its precise position. It picks a position based on the target and zoom.
hendu
 
Posts: 1557
Joined: Sat Dec 18, 2010 12:53 pm

Re: Position my Maya Camera.

Postby TJBaldy » Thu Jan 19, 2012 6:22 pm

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


Return to Beginners Help

Who is online

Users browsing this forum: No registered users and 0 guests