JeanSwamp
Member
Hello,
I've been tweaking my camera every now and then because after adding new features to it, I might run into new problems. Currently I am having issues with the vertical parallax scrolling my layers. This is for a 2D Sidescroller.
This is how I am scrolling the layer_y
is set to 400 and buffer is 16px used to make sure screenshakes don't show empty spaces on edges.
The problem I have is, when the room is heigher than the view size (therefore the camera will move on the Y axis) when on the lower parts of the room a simple jump by the player will trigger the vertical parallax, making it look weird and I am unsure why this is happening since I did not have this issue before.
Hopefully someone with experience can point me in the right direction.
EDIT: I might be overthinking it as looking into some games as examples, they do have similar effects. But still I'd like to improve my camera!
Thanks!
I've been tweaking my camera every now and then because after adding new features to it, I might run into new problems. Currently I am having issues with the vertical parallax scrolling my layers. This is for a 2D Sidescroller.
This is how I am scrolling the layer_y
GML:
var _ypos = camera_get_view_y(cam) /(room_height-camera_get_view_height(cam));
Code:
if room_height >= bg_size
{
layer_y(layer_bg1,lerp(-(buff),room_height-bg_size+(buff),_ypos));
}
Code:
bg_size
The problem I have is, when the room is heigher than the view size (therefore the camera will move on the Y axis) when on the lower parts of the room a simple jump by the player will trigger the vertical parallax, making it look weird and I am unsure why this is happening since I did not have this issue before.
Hopefully someone with experience can point me in the right direction.
EDIT: I might be overthinking it as looking into some games as examples, they do have similar effects. But still I'd like to improve my camera!
Thanks!
Last edited: