godotengine / godot

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

Moving Parallax2D node using the move tool with grid snap enabled causes rubber-banding effect. #97601

Open Tejune opened 1 week ago

Tejune commented 1 week ago

Tested versions

System information

Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 SUPER (NVIDIA; 31.0.15.4633) - AMD Ryzen 5 5600G with Radeon Graphics (12 Threads)

Issue description

Moving a Parallax2D node using the move tool with grid snap enabled causes a "rubber-banding" effect. The node's scroll offset will still be updated in the inspector but will not appear in the editor window until the position is adjusted using the inspector or the scene is reloaded (eg. via switching tabs).

47995dbac447cbdfa602e040799d7aef

A few things of note:

While I did read the following on the documentation page for the Parallax2D node:

Note: Any changes to this node's position made after it enters the scene tree will be overridden if ignore_camera_scroll is false or screen_offset is modified.

...This issue appears to be unrelated. If it is related or intended, I believe the engine should clarify that.

Steps to reproduce

  1. Create a new godot project and open the 2D view.
  2. Create a new Parallax2D node.
  3. Optionally, add a Sprite2Das a child of the Parallax2D node. This will make the effect more visible.
  4. Optionally, set ignore_camera_scroll to true. This does not appear to have any effect, but the documentation says you won't be able to move it otherwise.
  5. Enable grid-snapping in the toolbar.
  6. Select the move tool and attempt to move the Parallax2D node.

Minimal reproduction project (MRP)

Parallax2D-moving-bug.zip

Tejune commented 1 week ago

This is my first issue here on the Godot repository, apologies if there are any issues! 😊 I will attempt to reproduce the bug in earlier versions of Godot. I am a little busy however so it might take a day or two!