1
General discussions / Re: Views and sprite world positions
« on: October 11, 2024, 04:44:13 pm »
Valid point. I am definitely drawing them as when I change their x position to within the viewport, they draw as expected.
I understand that, in other game dev that I did, not using views, I would have to position the sprites relative to the offset from the world origin so they would render on screen.
i.e Sprite.x = Sprite.x - xDistanceFromOrigin
If this sprite was then within screen dims, it was rendered/drawn.
But i thought that if I move the view(camera) away from the origin, the sprites would sit where they are until ‘seen’ by the view? i.e a sprite with an xpos of 1300.f would just be outside of the view (width 1280 as per my rendertarget). As the view position moves to the right, without adjusting the sprite, it would eventually come into ‘view’.
But this is not happening?
I understand that, in other game dev that I did, not using views, I would have to position the sprites relative to the offset from the world origin so they would render on screen.
i.e Sprite.x = Sprite.x - xDistanceFromOrigin
If this sprite was then within screen dims, it was rendered/drawn.
But i thought that if I move the view(camera) away from the origin, the sprites would sit where they are until ‘seen’ by the view? i.e a sprite with an xpos of 1300.f would just be outside of the view (width 1280 as per my rendertarget). As the view position moves to the right, without adjusting the sprite, it would eventually come into ‘view’.
But this is not happening?