jintal
14-11-2006 15:54:29
As the title says. I already researched and found that the coordinate sys of quake doesn't match ogre (or d3d). So when i load a BSP map in ogre, it would display the map's walls as the floor.
Supposedly, these line of code would fix this (found at the bottom part of http://grotsnik.ogre3d.org/wiki/index.p ... GtkRadiant , just translated for pyogre)
This should work perfectly, but the weird thing is, the camera is tilted a bit.
I browsed through the cpp codes of the ogre sdk demos and translated a part of the BSP.cpp:
similar to the previous code, this results in a tilted camera/world also.
as for now, i've just brute-forcibly adjusted the camera with this to fix the problem:
i'd like to know if there're any others using pyogre who've encountered the same problem?... and for the guru's, do you know any proper way to solve this?
thanks in advanced!
Supposedly, these line of code would fix this (found at the bottom part of http://grotsnik.ogre3d.org/wiki/index.p ... GtkRadiant , just translated for pyogre)
self.camera.setFixedYawAxis(True, ogre.Vector3.UNIT_Z)
self.camera.pitch(ogre.Degree(90).valueRadians())
This should work perfectly, but the weird thing is, the camera is tilted a bit.
I browsed through the cpp codes of the ogre sdk demos and translated a part of the BSP.cpp:
#ViewPoint vp = mSceneMgr->getSuggestedViewpoint(true);
vp = self.sceneManager.getSuggestedViewpoint(True)
#mCamera->setPosition(vp.position);
self.camera.position = vp.position
#mCamera->pitch(Degree(90)); // Quake uses X/Y horizon, Z up
self.camera.pitch(ogre.Degree(90).valueRadians())
#mCamera->rotate(vp.orientation);
self.camera.rotate(vp.orientation)
# Don't yaw along variable axis, causes leaning
#mCamera->setFixedYawAxis(true, Vector3::UNIT_Z);
similar to the previous code, this results in a tilted camera/world also.
as for now, i've just brute-forcibly adjusted the camera with this to fix the problem:
self.camera.roll(ogre.Degree(7).valueRadians())
i'd like to know if there're any others using pyogre who've encountered the same problem?... and for the guru's, do you know any proper way to solve this?
thanks in advanced!
