Transferring player's physics related code to player class.