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

3D/Spatial editor: Support snapping to vertex, surface, and CollisionShape #21006

Closed
WolfieMario opened this issue Aug 14, 2018 · 5 comments
Closed

Comments

@WolfieMario
Copy link

Godot version:
3.0.3

OS/device including version:
Windows 10

Issue description:

Godot lacks tools for snapping 3D objects to each other. This can make object placement tedious and imprecise, particularly when working with objects which aren't supposed to be aligned to a uniform grid.

Some ideas for object-to-object snapping:

  1. Snap the hovered vertex of the selected mesh to vertices of other meshes. This is useful for meshes which are broken into modular parts, and can be assembled together in different ways. For some models, vertex snapping is essential to make the connection seamless.

  2. Snap the selected object's origin to mesh surfaces. This makes it possible to precisely place an object on the ground, on a wall, etc., without having it clip through or float slightly.

    1. Optionally, the object could be rotated so its local Y axis is aligned with the normal of the mesh surface. This can help place objects on uneven surfaces, e.g. trees on terrain, or spikes on curved walls.
  3. Snap the selected object so it doesn't collide with any other CollisionShape. This is similar to snapping to a surface, except it works with physics shapes, to ensure that no collision geometry is intersecting. Maybe it could respect layers/masks, so bodies which can pass through each other aren't snapped.

Finally, Godot already sort of supports 'snap to mesh surface', except only when you first drag a scene to instance into the 3D view. As far as I am aware, it doesn't support this form of snapping when moving objects which are already in the scene.
Also, it seems to snap the dragged object's bounding box to the surface, rather than its origin. I can imagine this being a useful option, but not as useful as the origin point, or the object's descendant CollisionShapes.

This is by no means exhaustive; just some obvious use cases which came to mind. It may make sense to split this into separate issues for each type of snapping.

@WolfieMario
Copy link
Author

Example using vertex snapping to seamlessly connect separate meshes:

pipe-snapping2

@HarDevSan
Copy link

Example using vertex snapping to seamlessly connect separate meshes:

pipe-snapping2

+1
Without the ability to precisely snap modular kit parts together, level designers feel naked. I think it is an essential part of a 3D game workflow. I'd love to see this feature. It's not a small thing to be missing when it comes to level design. Crossing fingers. (Thanks for all the hard work put into this lovely engine by the way)

@SlashScreen

This comment has been minimized.

@Calinou
Copy link
Member

Calinou commented Jan 12, 2020

@SlashScreen Please don't bump issues without contributing significant new information; use the 👍 reaction button on the first post instead.

@clayjohn
Copy link
Member

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

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

No branches or pull requests

5 participants