Final configuration:
function clbk_prestep(simt,simdt,mjd)
if vi:get_groundcontact() == true and vi:get_attachmentstatus(Attach0) == nil and vi:get_attachmentstatus(Attach1) == nil then
vi:del_animation(anim_Chute)
end
end
function clbk_poststep(simt,simdt,mjd)
if...
Easy workaround is to clear the meshes, which deletes the animations, then add the mesh again.
if vi:get_groundcontact() == true and vi:get_attachmentstatus(Attach0) == nil and vi:get_attachmentstatus(Attach1) == nil then
vi:clear_meshes()
vi:add_mesh('JMpl/JMpl')
end
Relevant bits...
trans_Drogue = { -- transformation for drogue animation
type = 'scaling', -- transformation type
mesh = 0, -- mesh index
grp = {1,2}, -- group indices
ref =...
I verified ground contact with this:
if vi:get_groundcontact() == true then
vi:set_animation(anim_Chute,0)
end
It works as expected.
I verified animation deletion by then calling del_animation at 300 meters. This stopped the previous code from working.
Initial position was "0", chute at small...
I'm trying to use "del_animation" like this:
function clbk_poststep(simt,simdt,mjd)
if vi:get_groundcontact() == true then
vi:del_animation(anim_Chute)
end
end
I'm expecting the animation to be deleted and the mesh groups to revert to their initial state but that's not what happens.
The...