Getting info from a DotScene file?

pwMody

05-01-2013 15:53:06

Hello!
I have used the Mogre DotSceneLoader found here:
http://www.ogre3d.org/tikiwiki/tiki-ind ... ceneLoader
To load a .scene file, Which turned out great and the file was loaded.
However I'm now trying to access a camera inside that file called "Camera#0" which I know that it's there
The method I thought of was..Since I loaded the whole file and specified my scene manager, I'm going to definitely find it in my scene manager right?
So I used this line :
Camera cam = sceneMgr.GetCamera("Camera#0");
But apparently, That failed..And I found this error in my log file:
18:36:14: OGRE EXCEPTION(5:ItemIdentityException): Cannot find Camera with name Camera#0 in SceneManager::getCamera at ..\..\ogre\OgreMain\src\OgreSceneManager.cpp (line 314)
Although I'm pretty much sure that it's in my .scene file, This is it:
<camera name="Camera#0" id="290292064" fov="1" projectionType="perspective">
<position x="2.90831" y="17.9001" z="-14.7595" />
<rotation qw="0.254602" qx="0" qy="0.967046" qz="0" />
<clipping near="0.1" far="1000" />
</camera>

...I added it to the scene using Ogitor
So..How do I exactly get the camera?

tafkag

08-01-2013 11:06:48

Hi pwMody,

have you debugged into the camera parsing code to see what the dotscene loader is actually doing with your xml file? e.g. set a breakpoint inside processCamera(), see if it's hit and what happens inside the method.