character movement problems
Asked Answered
W

1

0

Help in Godot: I'm making a 2D game on the latest version of the engine, and I have a gameplay scene, it has buttons to enter the backpack menu, quests, etc., and this is where the player scene is imported, that is, it runs here, though and has a separate player scene, it simply contains the character himself. The character moves by tapping on the screen like in the game "day p", but when I press the buttons the character moves in the direction of the buttons and when calling other scenes, he appears on top of any other scenes (player). How to fix it?

Wouldst answered 5/3 at 17:59 Comment(0)
X
0

when asking for help in things like these you should post some pictures of the problem
it sounds like a problem with scene order:
in 2D, scenes are rendered in the order they appear in the tree, first to last. I don't have much experience with 2D other than with control nodes, but there are options in sprite to set the "ordering" or "priority" of render, to set it as background, foreground, etc.
In Visibility (of inherited node CanvasItem), you can set the node2D as Show behind parent to send it back, and top level to send it forward. There's also clip children which lets you set the node2D as a mask.
another solution would be have the character in the correct order. You could be spawning the scenes before the player, you should use Nodes to spawn scenes, to keep them in the order they are supposed to be. like this:

hope it helps.

Xylophagous answered 8/3 at 0:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.