Gostaria de inserir um plano através do Ogre3D pelo método Entity e SceneNode.
Por favor, poderiam me ajudar para eu saber se tem algo de errado no código abaixo, poque somente o mesh aparece, mas o plano (plane com a textura rockwall) não aparece.
bool Inicializa::CarregaMalhas() {
/*parte da criação do plano*/
Plane plane(Vector3::UNIT_Y, 0);
MeshManager::getSingleton().createPlane("ground",ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,plane,1500,1500,20,20,true,1,5,5,Vector3::UNIT_Z);
Entity *entPlano = scene_mgr->createEntity("chao","ground"); SceneNode *nodePlano = scene_mgr->getRootSceneNode()->createChildSceneNode("chaoNode"); entPlano->setMaterialName("Examples/Rockwall"); nodePlano->attachObject(entPlano);
/*parte do criação do mesh*/
Entity *ent1 = scene_mgr->createEntity("Robot","robot.mesh"); SceneNode *node1 = scene_mgr->getRootSceneNode()->createChildSceneNode("CuboNode"); node1->attachObject(ent1); node1->setPosition(Vector3(-25,0,-200)); node1->setScale(Vector3(1,1,1)); ent1->setCastShadows(true);
return true; }
|