Here’s the kind of snappy interaction that I want (from Allan Bishop’s Box2D tutorial):
And here’s what I currently have. I’ve implemented picking and dragging by rewriting DragRigidbody.js (from Standard Assets/Scripts
) with the appropriate 2D API calls. Essentially, an empty GameObject is created and a SpringJoint2D is attached to that empty GameObject. While the left mouse button is held down, the empty GameObject’s position is set to the current mouse position. This drags the attached object along.
Within my script, the frequency is set to 2.5 and the damping ratio is set to 1.0. I can try increasing the frequency for a stiffer spring, but it’s not the instant snap behavior I want.
Why is my version far less snappy?