Hi everyone!
I have a simple mockup game with some draggable ghosts (sprites). Sometimes the sprites will be stuck in the level obstacles, and i need the springJoint2D to “break” when the distance between the Sprite and the Cursor are too long. Like a “MaxDistance” value.
The SpringJoint is place via script, and I can’t figure out how to listen neither the _SpringJoint2d.anchor or _SpringJoint.connectedAnchor positions.
like this.
I am using something like:
if ("Distance between" > MaxDistance) {
StopCoroutine ("DragObject");
};
But i dont know how to describe this “Distance between”…
Someone have a solution for this?