#need help with camera2d

24 messages · Page 1 of 1 (latest)

celest karma
#

I just want the camera to follow the player but it seems to e changing the position of everything that it can see and makes it look weird

#

it moves the player and enmey a bit to the left, as you can see in the video my player was above a platform but when i ran the scene it moved it to the left, and the camera is only connected to the player node so why and how is it changing the position of enemy ?

upbeat kernel
#

it think it might be because the objects are on a parallax layer

#

those move depending on the camera position

celest karma
#

ohhh okaaay wait

#

i changed the objects type to node2d from parallax layer, seems like half of the problem is solved, thanks:)), but now it seems tp shif the bg down on the y axis ? and also i can't scroll the platforms anymore, :"

upbeat kernel
#

yeah you dont' even have a camera anymore

#

oh wait you do

celest karma
#

i dooo

#

yes it's in the player node

upbeat kernel
#

is it set to current?

celest karma
#

yesss

upbeat kernel
#

huh i dunno then

#

maybe change the type of the root node?

#

the Level_1 node

#

make a normal node not parallaxbackground or whatever it is

celest karma
#

ohh okay , wait a sec

celest karma
upbeat kernel
#

you can make the parallax background a child of the root node instead of the root node

celest karma
upbeat kernel
#

Okay 😰

celest karma
#

it's alright, my brain is melted for today, i'll leave it for now😭

celest karma
#

I FIXED IT !!

#

i had to change the anchor mode of camera from "drag center" to "fixed topleft"