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