Reimplemented the position update function in the character.cs class.