Octoputs: Modular Movement & Drag-and-Drop Toolkit for Unity
William Besnard discussed the development of Octoputs, a modular Unity-based toolkit that turns drag-and-drop interaction into a versatile movement system with over 40 adjustable modifiers and supports live edit preview and a programmable workflow for everything from Hearthstone-style card game player actions to fully automated Factorio-like factory systems.
Introduction
My name is William Besnard, and I'm the solo developer behind Jungle Tools, a small family of Unity tools. You might know Grabbit, my physics placement tool for the Unity Editor.
Octoputs is its runtime sibling: it lets your players pick things up and attach them to slots. It started as drag-and-drop and grew into a full movement toolkit, so anything that moves in your game can run on it.
I spent about a year on it, trying to build the most modular and easiest way to get good game feel out of any movement.
Below, I go through how it works, then four of the example scenes and how I built them.
Everything in that card game is powered by Octoputs
Because playing it is better than reading about it, check out what Octoputs can do in one of the browser demos!
Everything that moves in them, the cards, the furniture, the astronaut's resources, the factory arms, even the camera, is driven by Octoputs.
Every move was set up in the Inspector and tuned with a live preview in Edit mode.
The Problem with Drag-and-Drop
An object following the mouse is a few lines of code. Then the object clips through a wall, the card snaps into its slot with no life in it, or the inventory needs rules about what fits where. You want to change the way the drag feels, and you need to rewrite the movement code from scratch.
So I wanted a toolkit that splits any movement into small pieces a designer can recombine in the Inspector, without code, until it feels right, whether that's heavy and physical or bouncy and cartoony.
In that example, Octoputs handles a Sims-like game, with a bouncy, comical vibe
Detect, Move, React
In Octoputs, every interaction is split into three steps, each one its own field in the Inspector:
- Detect: what is under the cursor (or any other controller), using a raycast, a physics overlap, a screen rectangle, XR interactors, and a few more.
- Move: where the object goes and how it gets there (the target, modify, move pipeline below).
- React: what happens next: on pickup, on drop, on events, when something comes close, like a school of fish scattering when the anglerfish gets near.
No player here. The anglerfish hunts the school when it spots it, and the fish scatter
Because the steps are separate, you can swap one, and the other two keep working. Change the mouse for touch or a VR hand, and the feel and the rules don't change. The card hand, the Sims room, and the astronaut on the Moon all use that same setup.
Under the hood, there are two roles, plus one shortcut:
- An attachable object is anything that can be picked up.
- An attachment point is anything that can hold it. Both go through the same lifecycle (idle, attaching, attached, detaching), and each phase can have its own conditions and movements. Dragging is just "attached to the cursor", and dropping is "transferred to a slot".
- An object can also be moved without attachment rules: attaching a Transformer component to it lets you drive movements in any way you want.
Target, Modify, Move
Most of my time went into the transform step, a small pipeline with three stages:
- Target: where should the object be? Follow the ray hit under the cursor, glide along a line or a curve, walk a route at a set speed, ease between two poses, and so on.
- Modify: how should the move feel? A stack of small movement modifiers, each adjusting the target before it is applied: spring, momentum, tilt by velocity, pendulum swing, squash and stretch, snap to grid, surface slide, collision avoidance, and many more (over 40 in total).
- Move: how is the result written to the object? Directly to the transform, through a Rigidbody, a joint, an articulation chain, an IK chain, or a Jobs and Burst batch pipeline where hundreds of objects can move at once.
Modifiers run in order, and each one has a blend dial from 0 to 1.
This dial turned out to matter way more than I expected. You tune a feel by turning dials instead of rewriting code, and since the dial is just a value, you can drive it from anything at runtime (more on that in Smart values below).
Workflow 1: A Card Hand with Game Feel
Cards were where I started. I wanted to get as close as I could to the Hearthstone feel, just with movement, no extra visual fluff.
The setup:
- The hand is an attachment point with a fan layout, so the cards spread out and close the gap when one leaves.
- Detection is a raycast from the mouse. Picking a card attaches it to the cursor, whose target follows the ray hit on the table.
- The feel is a modifier stack on that move: a spring so the card overshoots and settles, tilt by velocity so it leans into the drag, and a pendulum swing for the release.
- The card's sub-elements also get small swing and momentum modifiers, which makes the cards feel magical.
- Dropping on the board transfers the card to a board slot. Drop it somewhere it isn't allowed, and it springs back to the hand.
Here is that card in the editor, on its hit reaction: it follows the enemy it hits, with two modifiers on top, and I tune it in the Inspector while it previews in the Scene view.
Offset and Noise Offset, tweaked while the preview runs
Octoputs runs the modifiers one after the other, each one starting from the previous result, so they never fight over the object.
The Noise Offset gizmo, and its value plotted in the monitor
Debug draw on a card: the noise wobble, how far it moved this frame, and its speed
Workflow 2: A Sims-Style Room
In the room example, items follow the floor or the wall under the cursor, and a surface snap keeps them in place: the clock flat on the wall, the fridge standing on the floor. A condition turns the item red where it can't go and green where it can.
The clock follows the wall's surface, and only turns green where it fits
Collision avoidance keeps the dragged item from sinking into walls, and Anti-Jitter and Hysteresis stop it from shaking when it's pressed against one.
Sliding around obstacles instead of through them
Workflow 3: An Astroneer-Style Inventory
I wanted to reproduce Astroneer's diegetic inventory and the way resources snap into their slots. It was actually one of the main inspirations for the architecture of Octoputs.
The movement didn't need to change compared to the card game, only the detection and the modifiers. The tricky part here is everything around it: switching between physical and non-physical steps, changing layers and parents, creating and consuming resources.
Octoputs' processes and filters handle all of that. I didn't add any custom script for this scene.
The same system as the card hand, driven by a character instead of a mouse
Workflow 4: A Factorio-Like Factory
Once the drag-and-drop core was there, I realized the same idea works for any movement logic, like in a factory builder such as Factorio.
An attaching agent runs the grab, hold, and drop sequence on its own when an event fires: a timer, a collision, an item arriving on a belt. The transfer system picks which object to take, how many, and where it goes. In the factory example, robot arms take items off one belt, feed a machine, and drop the result on the next belt, and none of it is factory-specific code.
The belts, the machine, and the arms all run on the same movement pipeline too.
Robot arms passing items along a factory line, each one is an agent with its own grab-and-drop sequence
When that becomes hundreds of objects, you can switch the move stage to the batch pipeline. It uses the same configuration, runs on Unity's Jobs and Burst, and allocates no garbage per frame.
Same factory, a lot more of it
Tuning Without Pressing Play
The biggest time saver for me was previewing movements in Edit mode.
A transform operation can play in the Scene View without entering Play mode, so you can change a spring value and see it right away.
Each operation field also has a preset button with about 150 ready-made feels (Heavy, Ice, Jelly, Snap, Magnet...), and you can save your own.
Presets swapped while the move plays in the Scene view, no Play mode
There are also debug tools that draw each modifier's effect in the Scene view, and gizmos to tweak the values with spatial awareness, which helps a lot when a stack of five modifiers does something you didn't expect.
Not Only Drag-and-Drop
Targets and modifiers don't care where the input comes from, so objects can also move on their own. In the space example, hundreds of asteroids orbit the planet and react when the ship flies through them.
Hundreds of asteroids orbit the planet with one single movement pipeline
Smart Values
Almost every number, vector, or rotation field in Octoputs is a smart value. You can type a value in, or point the field at a source: the distance to the cursor, the drag speed, a random range, a curve over time, a value from another object, or a small graph of nodes. You also pick when it is read (every frame, at each start, or once) and whether each object gets its own copy.
This is where modifiers stop being presets: a card leans harder the faster it's dragged, a wobble fades out once the object lands, and each asteroid rolls its own tilt at every start, just by plugging in the right value type.
Any number field has a toggle that lets you drive it from time, chance, distance, saved data, or your own source.
An Optional AI Helper
Octoputs also ships with five skill files that teach AI assistants how to set it up: making an object draggable, tuning the feel, setting the rules. They're plain text, optional, and nothing from them ends up in your build.
What It Runs On
Octoputs needs Unity 6 and works in 2D (with its own Rigidbody2D pack) and 3D, with mouse, touch, and XR. It comes with full C# source and 15 example scenes, and it's built on Jungle Core, a shared framework that all my plugins use, so they work together instead of shipping duplicate features.
If you make games where players pick things up, I'd love for you to try it and tell me where I could improve it!
Check out my Octoputs trailer, explore the tool in the Unity Asset Store, dive into its documentation, and join the Discord community to stay updated.