Hi Rodrigo,

You can use the OSG's meta object system i,e

   osg::Vec3d direction(...);
   node->setUseValue("direction", direction);


   if (node->getUseValue("direction", direction))
   {
       // do something with direction
   }

On Fri, 15 May 2020 at 18:16, OpenSceneGraph Users <
osg-users@lists.openscenegraph.org> wrote:

> Hi,
>
> I'm creating objects that must fall by gravity. So I need to assign a
> Vec3d, representing speed, to each Node. Is there a proper way to do it?
> Maybe some variable inside the Node, Geode, ShapeDrawable, etc, or some
> function for this kind of variable assignment? Or must I create an array
> outside the OSG variables?
>
> Thanks,
> Rodrigo.
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/2a51f5b0-9f51-45b5-acf5-17adc57f6b34%40googlegroups.com
> <https://groups.google.com/d/msgid/osg-users/2a51f5b0-9f51-45b5-acf5-17adc57f6b34%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to