Purchase this tool (for free!) on the Second Life Marketplace:
> Get Stackable Graph Cubes <
In response to a request on the SLOODLE forums, I decided to try making a script to let you reliably drag-move cubes around, such that they would 'snap' together, so you can build graphs and other blocky shapes. It was a good challenge, and so I've created a script to do the job.
Download
- stackable_graph_cube_1.2.lsl (highlighted) -- changed the event handling to respond to touches rather than moving (idea courtesy of Jeremy Kemp... ta!), and re-enabled physics by default, as it works better now. You can now also simply touch a cube to align it, in case lag is a problem
- stackable_graph_cube_1.1.lsl (highlighted) -- physics disabled by default, cubes snap in all dimensions, and rotations are (hopefully) fixed
- stackable_graph_cube_1.0.lsl (highlighted) -- allows (buggy) physics, works with vertical stacking only, and has rotation problems
Video
Usage
To use it, put the above script into a 0.5x0.5x0.5 cube in Second Life. Make sure the cube can be moved by anybody, and that's in. Clone as many as you need, and use Ctrl+Drag to move them around -- when a cube gets close to another, it should 'snap' to it, matching its orientation and lining up neatly.
Notes
Note: cubes will only snap to other cubes of the same name. You can use that to create independent stacks of cubes which won't interfere with each other.
Idea: if you want to create an immovable base, then disable the script in one of your cubes (but do not delete the script... just clear the "Running" checkbox). Other cubes will snap to that base, but the base won't snap to other ones. It's a good idea to change its colour to signify the difference, and to disable drag-moving on it.
Known Issues
- In version 1.0 and 1.1, the cubes don't always snap quickly, if ever... this seems to be a particular problem at low framerates
- Cubes can end up snapping into the same position as another... some kind of avoidance algorithm would be useful!
