So, I've banged away for a while at integrating the Sinbad Character Controller code from the sample into AOF. I've managed to do the simple things like pop the Sinbad character into the scene, but I have not made much progress in changing the AOF camera controller to the character camera controller.
Hopefully, one of you might have the time to offer some suggestions. I'm sure it's something simple that I am missing. (I learned to program in another language, so C++ syntax makes my head want to explode.)
My current problem is trying to add this line (commented out) in gamestate.cpp:
Code: Select all
void GameState::update(double timeSinceLastFrame)
{
//mChara->addTime(timeSinceLastFrame);
if(m_bQuit == true)
{
popAppState();
return;
}
My thought was that to get the character animations/camera to update, that I would have to use the SCC addTime function here in the AOF update function, but while this builds, it crashes when I try to enter the gamestate from the starting menu.
The error reported is:
Assertion Failed!
Program:...
File \OgreMain\src\OrgeNode.cpp
Line 393
Expression: !q1.isNaN() && "INvalid orientation supplied as parameter"
I can step through the three private functions of the addTime function without problem but when I remove my break points it crashes.
addTime takes a Ogre::Real parameter (deltaTime) while timeSinceLastFrame is a double, but I thought this was possible? (It only generates a warning.)
AOF will run without this line but (obviously) the character and camera do not move (update.)
Thanks in advance for any possible help with this.