Lines between my tilemaplayers

Godot Version

Godot 4.5.stable

Question

Hello! I’m having quite a hard time trying to solve this issue.

I have four tilemaplayer prefabs that I want to cycle through randomly to create an infinite scroller. Right now, I’m having issues with the prefabs themselves. For some reason, there are sometimes lines between my prefabs:
Godot_v4.5-stable_win64_mOZDFYKEK1

Trying to use “Snap 2D Transformations to Pixel” doesn’t fix this issue, and instead creates lines in the editor when there otherwise aren’t.
Godot_v4.5-stable_win64_0VsqyZEh8k

Is this a result of me just not knowing how to properly handle tilemaplayers? Is there a setting somewhere I’m missing? Thank you for any help.

Edit:

I should clarify I’m not using a parallax autoscroll because I need the tiles to have collision with the player. Here’s the code I’m using to move the tiles:

func _process(delta: float) -> void:
	for child in get_children():
		child.position.y += 128 * delta

Is your tilemap layer or any of it’s parents scaled by a strange amount?

Did a quick double check, none of my nodes are currently scaled.

I think Snap 2D transforms to pixel will help you, if the lines only show in the editor make sure you are viewing the game from an integer scale i.e. 100%, 50%, 200%. Maybe the partitions are actually 1 pixel off, is there anyway you could move the parent instead of the children individually?

1 Like

Wow, I feel silly. You’re right, the prefabs were just one pixel apart. I ended up changing my code slightly so they’d overlap, now I don’t see any lines at all! Thank you!