Object positioned in editor defaults to 0,0

Godot Version

4.3

Question

I have an enemy scene as a child of a battle_scene Node2D. I also have a player scene; both are Node2D.

I position the player at say (150, 50) and the enemy at (450, 50) by dragging in the editor, the transform shows these values.

However, when I run the game the player is indeed at (150, 50) but the enemy is at (0, 0) (the origin of the root ‘battle scene’ node), and I don’t understand why. There should hardly be any differences between player and enemy objects in the first place, and I haven’t coded movement anywhere. Any idea what’s gone wrong?

Update:
Whenever I reload the project the problem scene defaults to 0,0 in the editor. Dragging it out again to a different position seems to change nothing.

1 Like

Could you give us a copy of the scene or the whole project to check try to find the problem?

1 Like

Thanks but dont worry, it was an animation reset on the root of the object rather than the sprite

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.