Updated the position calculation in camera transformation