Skip to content

Commit 4e77e6f

Browse files
committed
ovis: fix camera entity positioning
1 parent e1ecf77 commit 4e77e6f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/ovis/src/ovis.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ static SceneNode& _getSceneNode(SceneManager* sceneMgr, const String& name)
119119
try
120120
{
121121
mo = sceneMgr->getMovableObject(name, "Camera");
122+
123+
// with cameras we have an extra CS flip node
124+
if(mo)
125+
return *mo->getParentSceneNode()->getParentSceneNode();
122126
}
123127
catch (ItemIdentityException&)
124128
{
@@ -385,6 +389,8 @@ class WindowSceneImpl : public WindowScene
385389
Vector3 t;
386390
_convertRT(rot, tvec, q, t);
387391
SceneNode* node = sceneMgr->getRootSceneNode()->createChildSceneNode(t, q);
392+
node = node->createChildSceneNode();
393+
node->setOrientation(toOGRE); // camera mesh is oriented by OGRE conventions by default
388394
node->attachObject(cam);
389395

390396
RealRect ext = cam->getFrustumExtents();

0 commit comments

Comments
 (0)