mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Fog effect when camera is inside cloud
Fixes issue #3576 * Clouds now take camera position as 3D, not 2D * Cloud grid filling extracted to gridFilled method * Clouds detect whether camera is inside cloud * Camera in cloud changes fog by overriding sky colors with cloud color * Sun, moon and stars can be temporarily disabled with setBodiesVisible * Disabling fog also disables all "inside cloud" behaviors
This commit is contained in:
@@ -314,7 +314,7 @@ GUIEngine::~GUIEngine()
|
||||
void GUIEngine::cloudInit()
|
||||
{
|
||||
m_cloud.clouds = new Clouds(m_smgr, -1, rand(), 100);
|
||||
m_cloud.clouds->update(v2f(0, 0), video::SColor(255,200,200,255));
|
||||
m_cloud.clouds->update(v3f(0, 0, 0), video::SColor(255,200,200,255));
|
||||
|
||||
m_cloud.camera = m_smgr->addCameraSceneNode(0,
|
||||
v3f(0,0,0), v3f(0, 60, 100));
|
||||
|
Reference in New Issue
Block a user