commented out some bugs, but added variables for previous positions and directions
panning, trying rotations