Hi
Your application is really really great, and easy to use. Thanks a lot, it helps me so much
Now, questions time. If it's not the good place to ask, tell me and I'll move it in another subject.
Well, I'm using your application with a scene that i've exported with OFusion. The scene runs correctly if I run it in Ogre, not QtOgre.
I've two problems with QtOgre :
- First, the shadows aren't displayed. Lights are in the scene manager, I can set them invisible. But the method setCastShadows doesn't do anything. Do someone know why ?
- And second, animations. Again, in a basic Ogre application, they run fine, but in QtOgre, nothing moves*. Where you normally call the function "addTime" for your Jaiqua or Robot entities, I call a function updateAnimations(float timeElapsedInSeconds) with the code given by OFusion to run animations.
Here is this code :
Code: Select all
void DemoGameLogic::updateAnimations(float timeElapsedInSeconds)
{
static Ogre::Real currentTime = 0;
// We update all loaded animations each frame
Ogre::SceneManager::AnimationIterator animationIt = mSceneManager->getAnimationIterator();
while(animationIt.hasMoreElements())
{
Ogre::Animation* animation = animationIt.getNext();
const Ogre::Animation::NodeTrackList& trackList = animation->_getNodeTrackList();
Ogre::Animation::NodeTrackList::const_iterator it = trackList.begin();
Ogre::Animation::NodeTrackList::const_iterator iend = trackList.end();
for(; it != iend; ++it)
{
const Ogre::NodeAnimationTrack* track = it->second;
track->getAssociatedNode()->resetToInitialState();
}
currentTime += timeElapsedInSeconds/1000;
animation->apply(currentTime);
}
}
* Edit : Well, I've deleted the division by 1000 for the timeElapsedInSeconds. And I've noticed that animations moved every time I click or resize the render window, or the log window too. That's really strange, I keep searching.
Anyway, thanks again for this framework
Cha