0 votes

I have a sideways bridge that has railings on the front and back. I need my player to be able to appear to be behind the front railing of the bridge, while appearing to be in front of the rest of the bridge (middle and back railing). My solution that I have implemented (and it works) was to separate the front railing into it's own StaticBody2D and to place it in the correct position on the rest of the bridge. I was not able to put the front railing as a child of the bridge, because then my player would not be sorted with it. While the solution I have does work, it seems really hacky and I would like to know if there is a better way to complete this. Thanks!

Godot version 3.2.3
in Engine by (12 points)

Have you tried changing the z-index in the [Inspector] tab?

Changing the z-index of what? If I change the z-index of the bridge I would either always be in front or behind the entire thing.

1 Answer

0 votes

I haven't watched this, but it may have the answers you're looking for: https://youtu.be/2Lut64tE3xM. It's a devlog about adding bridges to a top-down RPG game. Sorry if this wasn't helpful.

by (113 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.
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.