I have a TileSet with animated tiles and I would like to synchronize an object to the animation.
Is there a way to get the current animation frame number or the location of the sprite/tile in the spritesheet?
Notes: I can get a lot of info with get_cell_tile_data()
, get_cell_source_id()
, get_cell_atlas_coords()
, get_cell_alternative_tile()
but the frame number does not seem to be among those. I know the interval between the frames but calculating the assumed frame number (from Time.get_ticks_usec()
or so) always leads to skewing. Currently I think my best shot at syncing things up would be me changing the tile at a set interval in code.