Snap to Grid Tool - A script for easy snapping of object positions and scales to a grid within Godot.
The Snap to Grid Tool is a script for the Godot game engine that allows you to easily snap the position and scale of objects to a grid within your game environment. It provides flexibility by allowing snapping along different axes and with customizable step sizes.
- Snap object position and scale to a grid.
- Customizable snapping options for X, Y, and Z axes.
- Adjustable positioning step and offset.
- Support for scaling step.
- Download the
snap_to_grid_tool.gd
script. - Add the script to your Godot project's scripts folder.
- Attach the
snap_to_grid_tool.gd
script to the objects you want to snap to the grid. - Adjust the tool's properties in the Inspector panel according to your requirements.
- (Note: You may need to reopen the scene after attaching the script for it to start working.)
- During game development, the tool automatically snaps the object's position and scale to the specified grid.
Check out the cube_example.tscn
file for an example of how to use the Snap to Grid Tool with a cube mesh.
This program is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.