How to Use the Included Scripts
🔳 SnapToGrid.cs
Automatically align modular pieces to a perfect grid!
- Just add SnapToGrid.cs to your prefab (floors, walls, props, etc).
- Your object will snap precisely to the grid based on its dimensions — even after rotating it!
- Works both in play mode and in the editor.
- Ideal for building modular levels quickly without worrying about manual alignment.
🌀 Optional Setting: Rotate Independently
If you want a specific object to rotate freely without snapping (like a decorative prop or dynamic object), just enable the checkbox:
✓] Allow Free Rotation
Perfect for mixing modular building with more organic elements!
🎥 IsoCameraFollow.cs
Simple and powerful isometric camera with rotation and zoom.
- Attach IsoCameraFollow.cs to your camera.
- Drag your player or target into the "Target" field in the Inspector.
- Zooms in and out using the mouse scroll wheel (orthographic mode only).The camera:
Smoothly follows the player;
Rotates in 90° steps using Q and E;
Fully modular, ideal for grid-based games, RTS, building games, or isometric exploration.