Hi Carlos,

You also need to add the mapNode to the SkyNode as a child.  Try:
s_sky->addChild( mapNode );

Jason

On Wed, Oct 22, 2014 at 9:24 AM, Carlos Sanches <[email protected]> wrote:

> Hello !
> How do I have to setup the SkyNode by code?
> In the past I sed this:
>
>     // SKY
>     const Config& externals = mapNode->externalConfig();
>     Config skyConf = externals.child( "sky" );
>     double hours = skyConf.value( "hours", 3.0 );
>     s_sky = new SkyNode( mapNode->getMap() );
>     s_sky->setDateTime( 2011, 3, 6, hours );
>     s_sky->attach( &viewer );
>     root->addChild( s_sky );
>
> But now this is not working . What do I m doing wrong please?
> --
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to