Solved my own problem. For those who are interested you you will need to use toComp(). This converts the layer coordinates to the camera space coordinates. Then, given any z depth, the viewport position matches the pixel dimensions in your comp size. So, for example, if you are using a 1920x1080 comp, the x value of the left edge of the screen is always 0 and the y value of the right is always 1920, no matter what the z value is. I added a variable in my code to allow for objects with an anchor point slightly out of the viewport to still be visible.