Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

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)

ohh I understand, and how can I shift the view towards?

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.