1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Add a dynamic infinite grid to the 3D editor

- The grid is now infinite, it follows the camera.
- The grid is now dynamic, if you zoom in and out, the grid subdivides,
  expands, and fades.
- You can now enable grid planes for the XY and YZ planes. Only the flat
  XZ plane is enabled by default. Each plane is independently dynamic
  of the others.
- The default grid size has been increased to 200, and the maximum
  has been increased to 2000. At 1000, the grid mostly looks edgeless.
- If you set the division level max and min to the same value then
  the grid does not expand or subdivide, but instead stays the same size
  and just follows the camera. Also, if these values are the same,
  the bias value does nothing.
- If you want to have Blender-like behavior, set max to 1, min to 0,
  and set the bias to a really low value. You may also wish to increase
  the grid size if you have a small bias.

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
This commit is contained in:
Hugo Locurcio
2020-10-30 11:20:41 +01:00
parent d0a5ef9c7a
commit 4b1de5be45
3 changed files with 166 additions and 60 deletions

View File

@@ -760,6 +760,7 @@ public:
Ref<ArrayMesh> get_scale_gizmo(int idx) const { return scale_gizmo[idx]; }
Ref<ArrayMesh> get_scale_plane_gizmo(int idx) const { return scale_plane_gizmo[idx]; }
void update_grid();
void update_transform_gizmo();
void update_all_gizmos(Node *p_node = NULL);
void snap_selected_nodes_to_floor();