M
MrChickenGuy
Guest
I want to keep an object at a specified position on the screen at any given time. This is the simplified script I have for a test object at the moment:
This works fine until the view in the room in extended.
Here is the location of the object before zooming out (the green square):
But when zoomed out, the location changes because now every pixel is .66 of the original size (view changes from 1280x720 to 1920x1080):
The object still moves along with the screen, but because the view in the room is larger, the X and Y coordinates given are no longer at the edge of the screen.
I want to be able to essentially replicate how the Draw GUI event works; keeping sprites in the same location despite the viewport. But through a Step event so I could, for example, create objects at the corner of the screen.
Thanks in advance!
Code:
x=view_xview[0]+1000;
y=view_yview[0]+100;
Here is the location of the object before zooming out (the green square):
But when zoomed out, the location changes because now every pixel is .66 of the original size (view changes from 1280x720 to 1920x1080):
The object still moves along with the screen, but because the view in the room is larger, the X and Y coordinates given are no longer at the edge of the screen.
I want to be able to essentially replicate how the Draw GUI event works; keeping sprites in the same location despite the viewport. But through a Step event so I could, for example, create objects at the corner of the screen.
Thanks in advance!