I wanted to make an auto-scrolling level, but I ran into a problem

Godot Version



I put the tilesmap and a bunch of child nodes into one scene,
instantiated into another scene,
and then used the parent node’s script to move it to the left,
It’s actually a mess of work
how should I implement this idea, or should I use a camera node to do it?

(It works very well with the switch to camera node control, but I wonder if Godot doesn’t support moving a large number of children through the parent node like this, or is there something wrong with my approach?)
Thanks for the help

1 Like

I don’t think there’s enough documentation of what happens if the parents of a Physics Body moves for me personally to try doing what you’re doing. In theory if each node is only moving along it’s local position, what you’re doing is fine, because only their global position is changing, and relative to each other they are staying still. However I wouldn’t be surprised if some collision bodys, such as the StaticBody2D, caused strange behaviours from moving. It may be worth giving it a try and writing about your experience with it, just from a documentation view.

I also think that it would be harder to control and visualise on my end. If I had the choice, I would go for using a camera, placing it on a Path2D and having it’s path position go up as the level progresses. Maybe have an Area2D on the edge that moves with it that if the player touches, kills them.

1 Like

Thanks for your reply
it used to be like the image moved but collider didn’t
I’ve switched to the camera node and it works really well
this will affect what I need to pay attention to when using Godot in the next :innocent:

Here’s a video I recorded
the collider and picture are inconsistent