Player 2 is in the center of the screen here so it seems to work except you should shift the view manually (e.g. add 0.25 to the x coordinate and -0.125 to the y coordinate) to compensate for the point of interest always being in the top right corner?
I expressed myself badly. I would like the circle to always appear at the top right of the view and for the circle to start and end at the coordinates of objPlayer2. I don't want objPlayer2 to be in the center of the screen, I need to be able to place objPlayer2 anywhere in my project around the level. ✌🏻😎
Yes; and I'm saying that...
Is it easier to explain as bullet points?
- the view is currently always centered around the player
- however, you always cut out the part in the top right (= not the center)
- therefore, you need to shift the view towards the top right, so that the region you cut out will contain the center (where the player is)
Add a value between -1.0 and +1.0 to the final calculation of the "tlc_" variables (="Top Left Corner").
For the X value negative values moves the view left (so the object appears further to the right in the view) so I think that's what you want to do, for the Y value negative values moves the view up (so the objects appears further down).
I'm not sure what will look right so you might need to try different values, but I think -0.35 for the X coordinate and +0.15 for the Y coordinate will be a good starting point with the screen size you're using.