Sorry, I was unclear... "xAnimationSpeed" is not a valid keyword so it
is the same as commenting it out... Remove the initial x...

If you're using the latest svn version you probably have additional
problems... I tried to convert it to osgViewer (from osgProducer)
before my vacation but it seems I was not entirely successfull... I've
looked closer at the problems now and for the time being you have to
run it in single threaded mode with osgViewer... Otherwise you get
trouble with bodies thinging they are out of FOV when they are not...
Also, the handling of modkeys seems to be broken/missing in
osgViewer...

/Daniel

On 8/1/07, Renato Silveira <[EMAIL PROTECTED]> wrote:
> Thank you for help me. But I'm still in problem.
>  =(
>
>
> 2007/7/31, Daniel Sjolie <[EMAIL PROTECTED]>:
> > Hmm...
> >
> > I guess it was a long time since we actually used varying speed in
> > replicant body... I don't remember all the details of the top of my
> > head but I think the idea was to have something like the commented out
> > "walk_speed" animation in bizguy1.rbody that blends between walking
> > and running depending on what speed you set... Try activating that
> > animation and use something like this:
> >
> > action =  ..... ->getBody()->getActionPrototype(
> "ACT_WALK_SPEED" );
>
>
>  I checked the file bizguy1.rbody, the animation was not commented:
>
>  xAnimationSpeed {
>          name "walk_speed"
>          act_name "ACT_WALK_SPEED"
>          default_speed 0.7
>          Animation {
>              name "walk"
>          }
>
>          Animation {
>              name "run"
>          }
>      }
>
>
>  Then, I associate a keyboard key to do this action:
>
>
>   rbody::ActionRequest *action =
> m_body_vector[m_curr_body]->getBody()->getActionPrototype(
> "ACT_WALK_SPEED" );
>
>                  if (action)
>                  {
>                      float vel = 0.0;
>
>                      action->setPropertyFloat( "speed", vel );
>
>                      action->setPrioritized(false);
>
> m_body_vector[m_curr_body]->getBody()->executeAction(action,
> true);
>                  }
>
>
>  When I do it, action  is NULL.
>  I think I must activating this animation before do it. Do you know what I'm
> doing wrong?
>
>  Thank you!!
>
>  Renato
>
>
>
>
> > and then set the speed as before...
> >
> > Maybe you should add an
> >
> > Animation {
> >      name "stand"
> > }
> >
> > to "walk_speed" as well...
> >
> > I think that's the way it was suppose to work... :)
> >
> > /Daniel
> >
>
> _______________________________________________
> 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