i have this orbit camera code, but the problem is that if i rotate the pan angle of the camera the entity doesnt adapt and it keeps walking to same position when i move the joystick, for insteance, i move the joystick forward and the entity moves foreard, but if i rotate the camera 180° and i move the joystick forward the entity now walks backwards... dunno if it was clear.