mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-19 03:39:58 +00:00
OpenCS: Fix camera position retrieval in WorldspaceWidget
This commit is contained in:
parent
7bef97bf33
commit
12b8fcf0bf
@ -170,7 +170,10 @@ void CSVRender::PagedWorldspaceWidget::referenceAdded (const QModelIndex& parent
|
|||||||
|
|
||||||
std::string CSVRender::PagedWorldspaceWidget::getStartupInstruction()
|
std::string CSVRender::PagedWorldspaceWidget::getStartupInstruction()
|
||||||
{
|
{
|
||||||
osg::Vec3d position = mView->getCamera()->getViewMatrix().getTrans();
|
osg::Vec3d eye, center, up;
|
||||||
|
mView->getCamera()->getViewMatrixAsLookAt(eye, center, up);
|
||||||
|
osg::Vec3d position = eye;
|
||||||
|
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
|
|
||||||
stream
|
stream
|
||||||
|
@ -166,7 +166,9 @@ void CSVRender::UnpagedWorldspaceWidget::addVisibilitySelectorButtons (
|
|||||||
|
|
||||||
std::string CSVRender::UnpagedWorldspaceWidget::getStartupInstruction()
|
std::string CSVRender::UnpagedWorldspaceWidget::getStartupInstruction()
|
||||||
{
|
{
|
||||||
osg::Vec3d position = mView->getCamera()->getViewMatrix().getTrans();
|
osg::Vec3d eye, center, up;
|
||||||
|
mView->getCamera()->getViewMatrixAsLookAt(eye, center, up);
|
||||||
|
osg::Vec3d position = eye;
|
||||||
|
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user