kungfoomasta
24-02-2007 20:00:21
I Got PLSM2 working in my eihort app, which was really great!
But I'm having a hard time figuring out what is wrong with my camera. It seems the camera cannot yaw or pitch, only translate! I've tried debugging, but I'm using a mix of native and managed C++, so the debugging capabilities don't work that well (can't step in or view a lot of informaton on variables, etc.)
I just grabbed the CVS last night, maybe I should update? Can anybody post a small portion of code involved the creation of the PLSM2 scene manager, the creation of the camera, the viewport setup, and the loading of terrain into the scene, as well as the order?
Here is what I have...
Current Map is actually not set to None at this time:
DefaultMap=Terrain_Scene_Manager_Terrain
The creation of the camera is pretty much this code:
It's basically just a yaw node, with a child pitch node, with the camera attached.
This makes no send to me.. please help
KungFooMasta
But I'm having a hard time figuring out what is wrong with my camera. It seems the camera cannot yaw or pitch, only translate! I've tried debugging, but I'm using a mix of native and managed C++, so the debugging capabilities don't work that well (can't step in or view a lot of informaton on variables, etc.)
I just grabbed the CVS last night, maybe I should update? Can anybody post a small portion of code involved the creation of the PLSM2 scene manager, the creation of the camera, the viewport setup, and the loading of terrain into the scene, as well as the order?
Here is what I have...
// PLSM
mSceneManager = mRoot->createSceneManager("PagingLandScapeSceneManager","SceneCreatorSceneManager");
// TSM
//mSceneManager = mRoot->createSceneManager(Ogre::ST_EXTERIOR_CLOSE,"SceneCreatorSceneManager");
// Setup camera to be used in application
mCamera = new Stormsong::Camera("SceneCreatorCamera",mSceneManager);
mViewport = mRenderWindow->addViewport(mCamera->getCamera());
mViewport->setBackgroundColour(Ogre::ColourValue(0,0,0,1.0));
mCamera->getCamera()->setAspectRatio( (Ogre::Real)mViewport->getActualWidth() / (Ogre::Real)mViewport->getActualHeight() );
// Sound Manager must be created before any scenes, as they get singleton of Sound Manager
mSoundManager = new OgreAL::SoundManager();
// This function creates all the various managers behind PLSM2, so this call is required
// Current map is set to None
mSceneManager->setWorldGeometry( Ogre::String("paginglandscape2.cfg") );
Current Map is actually not set to None at this time:
DefaultMap=Terrain_Scene_Manager_Terrain
The creation of the camera is pretty much this code:
mSceneManager = CurrentSceneManager;
mCamera = mSceneManager->createCamera(mName);
mCamera->setAutoAspectRatio(true);
mCamera->setNearClipDistance(1);
// Camera Setup
mCamYawNode = mSceneManager->getRootSceneNode()->createChildSceneNode(mName + "CamYawNode",Ogre::Vector3(0,0,0));
mCamPitchNode = mCamYawNode->createChildSceneNode(mName + "CamPitchNode");
mCamPitchNode->attachObject(mCamera);
It's basically just a yaw node, with a child pitch node, with the camera attached.
This makes no send to me.. please help
KungFooMasta