Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragged resource file over scene should appear at it's drop position, not be centered at cursor #26549

Closed
KoBeWi opened this issue Mar 3, 2019 · 3 comments · Fixed by #39754

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Mar 3, 2019

Godot version:
3.1 beta10

Issue description:
Dragging a scene/texture into scene view always shows it at cursor's position. When you drop said resource, it will then align properly to grid or whatever.

E.g. this:
image
After dropping you get this (snapping to grid enabled):
image
which is not exactly where you dropped. It's even worse with placing scenes, because if you happen to have a scene with non-centered root, it will be shifted from the cursor by the root offset:
image

IMO whatever appears when you drag a resource over scene, should appear at it's drop position, not some weird cursor offset. Which means that e.g. texture file dragged into scene should snap to grid from start, not after placing it and moving again.

@KoBeWi KoBeWi changed the title Update object's position immediately after dragging from file dock Dragged resource file over scene should appear at it's drop position, not be centered at cursor Mar 3, 2019
@akien-mga
Copy link
Member

Snapping to grid can be implemented, but the second part of your issue is a bad idea (and not possible). If your scene's origin is not in the middle of a given sprite, we shouldn't hack it. You probably did this on purpose, you typically have several sprites, etc. If you're dragging a scene, you place its origin, that's normal. Fix the scene's origin if you don't want that.

@KoBeWi
Copy link
Member Author

KoBeWi commented Mar 4, 2019

But the problem with changed origin is this: https://gfycat.com/ChillyFreshIndigowingedparrot

@akien-mga
Copy link
Member

Oh ok, that's buggy then indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants