Flying in a datapack

Hey! I just made my first datapack. It's based on ant-man. I tried to add a flight mechanic, but I'm having trouble getting it to work well.

I got to a point where vertical deceleration was the issue, I used a janky technique where I summon an armor stand with a shulker on it for a tick, but it's somewhat visible, and only works when flying upwards. When flying downwards, it counts as being "on-ground" and disables the flight, plummeting you to your death.

I fear I may be overcomplicating this. Are there any popular/clean ways of implementing flight?

Continue to help post