[SOLVED] Rotation of camera around its Z axis?

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
MarcusD
Posts: 16
Joined: Sat Nov 27, 2010 12:57 pm
Location: South Yorkshire, UK

[SOLVED] Rotation of camera around its Z axis?

Post by MarcusD »

Hi everyone,
This is a problem I've not been able to resolve myself as yet and am at the stage of asking for help. So if anyone can assist me I'd be very happy :)

My project: A space flight game. The player is "sat" in a space vehicle. This vehicle is capable of rolling (z), pitching (x) and rotating (yaw, y). Now because the player aspect is sitting in the cockpit of the ship looking out into space, the camera HAS to be facing in the same direction as the ship is facing AND rotated in the same way. To explain this, imagine you are sitting in a ship like this, and you hit the "Roll" control. This will cause the ship to rotate around an axis running from the front of the ship to the back (z axis). This of course means that the way the ship is facing doesn't actually change, but the starscape the pilot sees will revolve. The problem is that setting the z axis rotation of the camera (i.e. the pilot's eyes) does not revolve the view at all. I really really need someone to tell me that this is actually possible with Irrlicht and how to do it, or everything I've written so far would have been in vain and I will cry a lot.

Kind regards,
Marc
Last edited by MarcusD on Thu Jul 05, 2012 8:39 pm, edited 1 time in total.
Irrlicht's Great, Irrlicht's Good. Irrlicht's better, than a lump of wood.
smso
Posts: 246
Joined: Fri Jun 04, 2010 3:28 pm
Location: Hong Kong

Re: Rotation of camera around its Z axis?

Post by smso »

Search for cockpit camera in the forum.

Regards,
smso
MarcusD
Posts: 16
Joined: Sat Nov 27, 2010 12:57 pm
Location: South Yorkshire, UK

Re: Rotation of camera around its Z axis?

Post by MarcusD »

Once I knew what to search for I found this
http://irrlicht.sourceforge.net/forum/v ... 0&start=60

which worked like a charm. Thanks for the nudge dude.
Irrlicht's Great, Irrlicht's Good. Irrlicht's better, than a lump of wood.
Post Reply