calculated kartPos and Dir in draw().