setUpVector for Maya camera

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.

setUpVector for Maya camera

Postby lfrohman7 » Sat Jan 06, 2018 7:29 pm

I can use the regular camera or FPS camera and setUpVector, and setPosition,
but these do not work for Maya camera - my scene displays with the z axis pointing to the right.

I could not find any info on this, how do I set my Maya camera in the correct orientation?

Posts: 1
Joined: Sat Jan 06, 2018 7:25 pm

Re: setUpVector for Maya camera

Postby manni63 » Fri Jan 12, 2018 1:52 am

The Maya camera is controlled by its animator CSceneNodeAnimatorCameraMaya that responds to mouse events. A look to the code of the
animateNode method shows that camera position and up vector are overwritten:
cpp Code: Select all
    pos = translate;
    pos.X += nZoom;
    pos.rotateXYBy(nRotY, translate);
    pos.rotateXZBy(-nRotX, translate);
    // Rotation Error ----------------------------
    // jox: fixed bug: jitter when rotating to the top and bottom of y
    LastCameraTarget = camera->getTarget();

In the initial state when no mouse input occured so far, the vector translate is the target position and nZoom seems to be the distance between target
and camera, which is set to 70 units by default in the constructor. So the camera is initially positioned 70 units in x direction from the target.
And from this point of view, the z axis goes from left to right.
I think it should be possible to change the code so that a start position and orientation entered by the user is kept. Perhaps I'll do this some day :D !
Posts: 11
Joined: Tue Sep 27, 2016 6:23 am

Return to Beginners Help

Who is online

Users browsing this forum: No registered users and 1 guest