yeah, I mean think about it.. as long as the y values are the same, it's just measuring a straight horizontal line.
Let me get this straight:
Player in center = object is right edge
Player is at left edge = object in center
Player at right edge = object half a screen beyond right edge
Is that right?
And you want to use the distance the player is from the edge to set where the object goes?
I worked on this for a minute, and I just keep looping back around to setting the object.x to player.x + half a screen
Is there some reason that's not an option?