updated PlayerController to work for whatever object it is attached to.