godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.34k stars 21.06k forks source link

GridMap Placement Preview Off Center When Child of a Translated Spatial #23713

Closed WatchThemFall closed 4 years ago

WatchThemFall commented 5 years ago

Godot version: 3.0.6 and the latest build

OS/device including version: W10 with latest updates

Issue description: The gridmap placement preview is off center from your mouse when it is a child of a spatial node that has a translation. The alignment grid and placement preview are supposed to be where your mouse is, but it is not there when the parent spatial node has a translation. For example, if the spatial parent is translated by by 50, 0 , 0, then the gridmap placement preview is off by 50. The block still goes in the area that you click, however. I apologize if this is already known or intended (for some weird reason), but I couldn't find any similar descriptions in the open issues.

Steps to reproduce:

  1. Create a spatial node
  2. Create a gridmap as a child of the spatial node
  3. Translate the spatial node by any amount
  4. Try to place a tile in the grid map
  5. The alignment grid and tile preview will be off by the same amount that that spatial node is translated. (The block is still place in the area that you click, however)
akien-mga commented 4 years ago

Can anyone still reproduce this bug in Godot 3.2.1 or any later release (e.g. 3.2.2-rc2)?

If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.

WatchThemFall commented 4 years ago

Sorry, I didn't realize this was still open. The last time I tried this it was on 3.1.1, and it was fixed. I can't test on any later at the moment. I assume it is still working on 3.2.1.