Syncing Sky/Sun problem


03-04-2009 11:02:25


I still have an issue with syncing the sky and the sun with the camera, when the camera is attached to a bone of an animated skeleton. I´m aware of how to solve the problem when the camera is the child of scene node (and this case works fine).

But whatever I do I still have the sun/sky jumping over the screen depending on the movement of the skeleton where the camera is attached to. My updates are performed after all translation/animation updates. I already tried several ways like updating the skeleton with Skeleton::_updateTransforms(void) and the wooden hammer SceneManager::_updateSceneGraph(Camera* cam). Without visible changes...

Does anybody have a solution for this problem?

Thanks, xad


03-04-2009 13:46:07

Ok I´ve got it!

Its necessary to call Entity::_updateAnimation(). After that all bones are up to date. Thanks god, Ogre is open source!



04-04-2009 11:43:11

It's great you solved your problem and posted here. Attaching a camera a like that is an obscure corner case but it might still help someone some day (if they search the forum).

Also: for the really complex issues having ogre's source available is indeed invaluable.