Caelum with rotating camera

Problems building or running the engine, queries about how to use features etc.
Post Reply
elventian
Gnoblar
Posts: 1
Joined: Sun Jan 20, 2019 11:33 pm

Caelum with rotating camera

Post by elventian » Sun Jan 20, 2019 11:59 pm

Ogre Version: 1.9
Operating System: Debian
Render System: OpenGL

Hello to everyone. I'm trying to use Caelum with non-static camera (i change pitch and yaw of camera by mouse move). and everything works fine except Sun is changing it's location every time I rotate camera.
SceneNodes I use:
Root -> trNode (with some constant translation) -> yawNode (apply yaw on mouse move) -> pitchNode (apply pitch on mouse move)
The last node (pitchNode) contains Ogre::Camera.

Feels like Caelum recalculates position of the Sun depending on Camera orientation, not only position.
I tried (with the same result)

Code: Select all

mCaelumSystem->setAutoMoveCameraNode(false);
Ogre::SceneNode *caelumCameraNode = mCaelumSystem->getCaelumCameraNode();
caelumCameraNode->setPosition(trNode->_getDerivedPosition(););
caelumCameraNode->_update(true, true);
So what is the right way to use Caelum with non-static camera?
0 x

Post Reply