mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:53:52 +00:00
fix sun angle
This commit is contained in:
parent
b3db4f1c27
commit
c8aab3a562
1 changed files with 4 additions and 1 deletions
|
@ -310,7 +310,10 @@ void RenderingManager::sunDisable()
|
||||||
|
|
||||||
void RenderingManager::setSunDirection(const Ogre::Vector3& direction)
|
void RenderingManager::setSunDirection(const Ogre::Vector3& direction)
|
||||||
{
|
{
|
||||||
if (mSun) mSun->setDirection(Vector3(direction.x, -direction.z, direction.y));
|
// direction * -1 (because 'direction' is camera to sun vector and not sun to camera),
|
||||||
|
// then convert from MW to ogre coordinates (swap y,z and make y negative)
|
||||||
|
if (mSun) mSun->setDirection(Vector3(-direction.x, -direction.z, direction.y));
|
||||||
|
|
||||||
mSkyManager->setSunDirection(direction);
|
mSkyManager->setSunDirection(direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue