johnnymanly
New member
Hello, I'm animating the landing gear in a Lua vessel like this:
This works but it's instant. I need to set the duration of the animation but I can't figure it out.
any ideas?
Thanks.
Code:
function clbk_poststep(simt,simdt,mjd)
alt = vi:get_altitude()
lgr = vi:get_animation(anim1)
if lgr == 1 and alt > 250
then
vi:set_animation(anim1,0)
end
if lgr == 0 and alt < 200
then
vi:set_animation(anim1,1)
end
end
This works but it's instant. I need to set the duration of the animation but I can't figure it out.
any ideas?
Thanks.