Rendering behind a parents paren?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By genfy
:warning: Old Version Published before Godot 3 was released.

I’m trying to create a weapon system, where the player can switch weapons (scenes of a weapon).

The method I came up with is as follows:
Project
An important point is that the “Hands” node is supposed to be a linked scene.

So the thing is, I want a script on the “Hands” node to control the left and right arm, but I want the “Left_Arm” node to be rendered behind the body.

In my game “Hands” will be swapped with scenes like “Gun” to switch weapons, and a “fire” function will be called when the player left clicks.

Is there a better system than this? Or is there a simple fix that’ll make me feel like an idiot? :slight_smile:

:bust_in_silhouette: Reply From: 2D

In cases where you need finer control than you have with the scene tree, you can change the Z index of the nodes under the Node2D properties in the editor or through code. Here is a similar question previously asked.