Camera panning works horizontally but not Vertically.

Now, I know that there is a way to make the camera move only when you reach the middle of the screen or the edge of a room's dimensions.
My setup does half of that. It stops panning when it reaches a room's borders but it pans when Frisk reaches the end of the screen, not the middle of the screen.
What am I doing wrong here?
1615323523067.png
 
The borders are how far away from the edge the player should be before it starts scrolling. So with your setup, it waits until the player is only a measly 32 pixel from an edge before the camera will start scrolling. Set it to around half the width and height to have the player stay in the center.
 
SOLVED

I sent the borders to 160 and 120. For some reason, it worked now? I could have sworn I did the exact same thing 2 days ago and it didn't work.
 
It looks to me (from the screenshot) that the vertical border is set to 160. The horizontal border is the one set to 120. In general, I use code to control my camera as I feel like it gives you a little more flexibility. Since you're regularly switching rooms, if you put something like this into your "Frisk" characters Step Event, it should make it so that all rooms he is in have correctly scrolling views (however, remember you have to enable viewports and set the specific view 0 to visible for each room you create):
Code:
view_xview[0] = x-view_wview[0]/2;
view_yview[0] = y-view_hview[0]/2;
 
SOLVED!
That IS the case. Thank you. Is there any way I can automatically set it to where it applies to every room Frisk heads into?
Maybe somewhere in their creation code?

* Reason why I am asking is because it will certainly get repetitive and time-wasting that I am constantly changing the Viewport, camera and following settings in each and every room.
 

Slyddar

Member
Is there any way I can automatically set it to where it applies to every room Frisk heads into?
You can set it all via code, but a quick method is to set up a 'template' room with the correct settings, and when you need to add a new room, just duplicate the template room and use that.
 
I'm guessing you could just copy-paste a room with the applied camera settings and then edit the dimensions, instances, backgrounds and name of that copy, then copy and paste that room and so on...?
 
Another question... how specifically do you reference the camera or the viewport to make a sprite show up...

for example, a textbox showing up on a fixed location of the screen/camera.
 
Top