Also with that code above, it seems to work best if you only activate it if the player is moving, that way if you stand idle next to a wall the camera wont move as you try and line it up for a jump etc.
You're very welcome Orange Brat

Your information and input on these forums is much appreciated and helped me lots. Your adventure thread is very interesting and informative.