[SOLVED] Objects not getting into correct zone

lvella

18-12-2008 13:38:14

Ok, continuing from topic in Help forum: http://www.ogre3d.org/phpBB2/viewtopic.php?t=46342

I am unfamiliar with the concept of "anchored", but I found out that the problematic scene node is never anchored:


node = (Ogre::PCZSceneNode*) pSceneManager->createSceneNode();

if(node->isAnchored())
std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nANCHORED\n!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
else
std::cerr << "XXXXXXXXX" << std::endl;

node->setScale(scale);
node->setPosition(pos);

node->setHomeZone(zone);
zone->_addNode(node);

if(node->isAnchored())
std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!\nANCHORED2\n!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
else
std::cerr << "XXXXXXXXX" << std::endl;


I always get "XXXXXXXXX" on my error output. Is it right?

Chaster

19-12-2008 04:30:42

Hmmm.. That seems fine.... I guess the problem is not anchoring..

Tell me a bit more about your scene and what you are trying to do. How do you have your scene set up? How many zones and what types? Do you have portals? What kind? How are they set up?

Chaster

lvella

19-12-2008 16:48:09

Hey! Problem solved!

Sorry to bother you, my mistake. Just after setting the correct zone of the thrown projectile, I reset it to the default zone in another function...

Chaster

19-12-2008 20:09:58

No problem. Cool, glad you got it to work. =)

Chaster