Why is the menu button and tilemap being rendered twice in different locations and angles when I only have one camera?
Im using Ubuntu.
code:
// ..HelloWorld::Init()
// Camera
auto s = Director::getInstance()->getWinSize();
auto camera = Camera::createPerspective(60, (GLfloat) s.width / s.height, 1, 1000);
// set parameters for camera
camera->setPosition3D(Vec3(0, 500, 500));
camera->lookAt(Vec3(0, 0, 0), Vec3(0, 1, 0));
this->addChild(camera); //add camera to the scene
// Tiled map .tmx
m_TiledMap = new TMXTiledMap();
m_TiledMap->initWithTMXFile("tiledMap.tmx");
//m_Background = m_TiledMap->layerNamed("Background");
//m_TiledMap->setNormalizedPosition(Vec2(.5f, .3f));
Size mapSize = m_TiledMap->getMapSize();
Size tileSize = m_TiledMap->getTileSize();
m_TiledMap->setPosition3D(Vec3(-mapSize.width / 2 * tileSize.width, 0, -mapSize.width / 2 * tileSize.width));
m_TiledMap->setRotation3D(Vec3(90, 0, 0));
this->addChild(m_TiledMap);