0 votes

So I am very new to Godot. I started learning the engine earlier last week and I've been progressing pretty well. I recently finished my first tileset for a topdown game and after making the tilemap and testing out my character's movement, I realized that I wanted the character to be able to move behind certain objects on the map. I figured that for certain objects, like trees and bushes, that it would make sense to remove them from the tilemap and have them as separate objects. However, I wasn't sure what to do about fencing that I want my character to move behind. Is the best option really to make each fencing sprite a static object and piece them together that way or could I layer tile maps to achieve the desired effect? Is there another solution that I am not aware of?

Any advice or help regarding this would be great, thank you!

in Engine by (12 points)

Im not sure if i understan what you want. You want that for some objects, your character appears to be moving behind, and sometimes in front? If so, what you are looking for is YSort node.

Is the best option really to make each fencing sprite a static object and piece them together that way or could I layer tile maps to achieve the desired effect?

You can make another tilemap with a bunch of fence tiles. Tilemaps have a ysort property, so you can the character behind and in front of the fence based on their y-position.

Thank you! I had no idea that was an option with tilemaps, but that sounds exactly like what I'm looking to do.

Please log in or register to answer this question.

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.