/Snap-to-Grid-Tool

Snap to Grid Tool - A script for easy snapping of object positions and scales to a grid within Godot.

Primary LanguageGDScriptGNU Affero General Public License v3.0AGPL-3.0

Snap to Grid Tool - A script for easy snapping of object positions and scales to a grid within Godot.

Overview

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.

Features

  • 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.

Installation

  1. Download the snap_to_grid_tool.gd script.
  2. Add the script to your Godot project's scripts folder.

Usage

  1. Attach the snap_to_grid_tool.gd script to the objects you want to snap to the grid.
  2. Adjust the tool's properties in the Inspector panel according to your requirements.
  3. (Note: You may need to reopen the scene after attaching the script for it to start working.)
  4. During game development, the tool automatically snaps the object's position and scale to the specified grid.

Example

Check out the cube_example.tscn file for an example of how to use the Snap to Grid Tool with a cube mesh.

License

GNU AGPLv3 Image

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.