Skywalker
14-12-2010 16:09:02
bool Body::advance(float step, const NxOgre::Enums::Priority&, const NxOgre::Enums::SceneFunction&)
{
mNode->setPosition( getGlobalPosition().as<Ogre::Vector3>() );
mNode->setOrientation( getGlobalOrientationQuat().as<Ogre::Quaternion>() );
return true;
}
Should it check mNode == 0, if I create a Body using Critter::RenderSystem.createBody() method without providing Mesh name(although we won't do this usually), it will not create SceneNode, and when Scene::render() calls Body::advance(), it will crash.
{
mNode->setPosition( getGlobalPosition().as<Ogre::Vector3>() );
mNode->setOrientation( getGlobalOrientationQuat().as<Ogre::Quaternion>() );
return true;
}
Should it check mNode == 0, if I create a Body using Critter::RenderSystem.createBody() method without providing Mesh name(although we won't do this usually), it will not create SceneNode, and when Scene::render() calls Body::advance(), it will crash.