Not at all, it was a demonstration for you to learn from and use however you like. If you look at the layers window in the editor you will notice that there are two layers. Layer 0 is the layer that most of the stuff is on and layer 1 is the layer where the blockers live. With that layer selected, up in the properties section you will see that parallax X&Y are both set to 0. This means that anything on this layer will remain where it is regardless of if scrolling is happening. Parallax at 0 is used a lot for UI elements etc.
When setting up objects on a 0 parallax layer you have to remember that they are relative to the viewport, not layout. So in the editor make sure you set them to the correct position on the viewport, or position them accordingly using events at runtime.
Thanks so much! This is super useful information for the future. However, I've got another problem now. When I was only using two player bases I thought it had something to do with their x-positions overlapping, but when I added the remaining two-player bases I realized that the way the camera seems to figure position as it relates to the viewport causes it to wig out when the player closest to the edge is airborne. I really have no clue why having a different y-position would mess with finding the x-position closest to the viewport and since the players in your sample only moved with respect to the x-axis, this problem did not pop up in your project.
I tried to record a video replicating all of the weird bugs I had encountered: youtu.be/OqVXGO9A7Ks
It's a few minutes long because I tried to get as many different iterations of the bugs as I could replicate, but to specify here are some of the common bugs related to this y-position viewport problem.
- With one base positioned at the right end of the screen, another in the mid-right, and two more on the left end, if the base on the right end jumps and holds out into the edge barrier, they'll warp through it, resulting in the camera snapping to its new position and either dragging all of the player bases with it or leaving the two leftmost ones outside of the barriers and out of the viewport entirely.
- If one base jumps over another so that at around the apex of the jump the two bases x-positions are overlapping the camera won't follow the jumping base. When the jumping base hits the ground, the camera snaps to a new position to accommodate it, as if the camera doesn't detect the jumping base when it's airborne.
- These problems seem to common less common and less obvious if I shorthop instead of holding jump for maximum jump height, but that may just be because the base is airborne for a shorter amount of time.
- Being on the top or bottom platform seems to influence whether or not a player base can push the viewport by holding into its respective edge barrier. The details of this bug are tough for me to articulate since it's a bit hard to tell what's going on, but I tried to get a couple of instances of it in the video.
If you know anything about why changes in y-position would be messing with how the program detects x-position with respect to the edge of the viewport and how I might be able to go about fixing it, please let me know. I'm fresh out of ideas and this is a bug I would like to fix before I try to program something more complicated like health/damage and hitboxes/hurtboxes. If you want to see what kind of code I'm using for jumping or running, give me a shout and I'll put it here. Again, thanks for all the help so far.