From 6bedb6de408d531c1843888edc6576040c368695 Mon Sep 17 00:00:00 2001 From: Ben Deutsch Date: Sun, 7 May 2017 18:41:47 +0200 Subject: 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 --- src/guiEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/guiEngine.cpp') diff --git a/src/guiEngine.cpp b/src/guiEngine.cpp index 5f5b4bbff..65ef1605a 100644 --- a/src/guiEngine.cpp +++ b/src/guiEngine.cpp @@ -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)); -- cgit v1.2.3