0 votes

Hey all,

I am currently trying to make a very basic test game just to learn some functions of how this game engine works. I have worked through the tutorials that this website provides. I have a character that moves is different directions and shoots with rotation in 90 degree increments and that rotation is controlled by a different set of keys. I'm to the point now where I would like to add a background and allow my player to move over the top of it. When I initially put the background in I loaded it just as a regular sprite without a canvas layer or ParallaxBackground node. The character could move and the camera would follow it correctly as it moved, but obviously not on top of the background. After this issue I looked up the canvas layer/ParallaxBackground nodes and started to try to learn about them. After loading my Background sprite in as a child of one of these my character no longer spawns where I place it even if I lock its position, and it auto defaults to the center of the background. Along with this issue the camera no longer pans with the character either. I do have Current checked on the Camera2D node and like I said it works perfectly fine when I removed the canvas layer/parallaxbackground but the character isn't on top. It's as if for some reason something is overriding the Current of the camera 2D and other settings from my other nodes. I also tried to set the Camera2D to current in the main script that I have running under the ready function but that didn't help either.

asked May 24, 2019 in Projects by Snickledoof (12 points)

1 Answer

0 votes

hello there,

You should make paragraph, your post was quite hard to read.

So your problem is that you don't see your character?

==> in the node tree check that your character node is below your canvaslayer node.
-main node

Hope this helps.

answered May 25, 2019 by mokalux (138 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.