Thanks, I really appreciate the help! Your changes worked perfectly. I’m not really qualified to judge the elegance of the code but I like its in-game feel.
I hope to be able to learn a bit more with regards to using python with upbge. Right now I have walk, run and idle animations working with logic nodes but need to learn more about how to integrate these better with the player movement.