Can't remove/destroy/clear just SkyBoxNode

RichTufty

03-12-2008 15:47:12

Hi all, I'm pulling my hair out over this one, looked high and low! :x

I am creating a sky box using SetSkyBox on the SceneManager.

Fine. Works.

Now i want to remove just the sky box from my game. I've tried the following but the sky box doesn't get removed!


//crashes!
sceneMgr.DestroySceneNode(sceneMgr.SkyBoxNode.Name);

//still there
sceneMgr.DestroyManualObject(sceneMgr.SkyBoxNode);

//still there
sceneMgr.SkyBoxNode.Dispose();


Any ideas?

Many thanks,
Tufty

mcaden

03-12-2008 21:08:19

I haven't done this before...but just a quick glance at intellisense...


sceneMgr.SetSkyBox( false, mySkyboxMaterial );


hope it works for ya