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" );
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
On 7/31/07, Renato Silveira <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> Sorry again for use this list for ReplicantBody questions...
>
> I integrated ReplicantBody with my path planner algorithm but I still have a
> question.
>
> In class "KeyboardEventHandler", when load "walk" animation, the speed wich
> the body will walk is defined by action->setPropertyFloat( "speed", vel );.
> If I change the vel value, nothing happens. The only way that I could change
> the velocity was getting the animation and chance the velocity:
>
> rbody::Animation * animationWalk = ((rbody::Animation*)
> m_body_vector[m_curr_body]->getBody()->getCoreBody()->getAnimation("run"));
> animationWalk->setSpeed(0.3f);
>
> It works only if I stop the "walk" or "run" animation, set the new velocity,
> and load "walk" or "run" animation again. So, it is not a solution. :-)
>
> I need to change the body velocity all the time, without stop the animation.
> What should I do? Or, what is the better way to do it?
>
> Any thoughts would be greatly appreciated.
>
> Thank you in advance.
> Renato
>
> _______________________________________________
> 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