Detecting WASD in Minecarts
Hello! I'm pretty new to this stuff but I've been inspired to make some datapacks by a friend. Right now I am trying to mess around with movement and really understand how it works. I'm trying to see if there's some kind of way to detect WASD in 1.21.5. I've read some posts on reddit that suggest you can save the vehicle's current momentum on a scoreboard and determine its direction using some funky math stuff, but I couldn't replicate it. When I move in a minecart mounted on an armorstand, its (and my) X, Y, Z, momentum are not affected.
I'm guessing that something changed recently, and I couldn't find anything about it, so I've decided to post here. Any help is much appreciated 🙂