x


spring joint minimum distance

Unity's spring joints work exactly the way I need them to (imagine an object tethered to another). Unfortunately, it doesn't appear as though there's a way to adjust the minimum distance. Everything I've read says that the connected body's distance at spawn is the minimum distance, and I don't see any way to adjust it via code or otherwise.

more ▼

asked Jun 10 '12 at 07:44 PM

jm0 gravatar image

jm0
0 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

So, there are minDistance and maxDistance variables on any SpringJoint. The documentation says that these numbers are relative to the initial distance between the two objects connected by a spring joint, meaning that the actual minimum distance a spring joint allows is equal to the initial distance + minDistance.

Try setting the minDistance variable to a negative number at runtime (or in the editor if you can) and see if that helps.

more ▼

answered Jun 10 '12 at 09:10 PM

drizztmainsword gravatar image

drizztmainsword
243 1 4 5

I am having the same issue with the initial distance and orientation between two objects connected by a spring joint.Setting minDistance to a negative value through scripting will give an error.

Jul 31 '12 at 12:41 PM Fady-S
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1879
x147
x9

asked: Jun 10 '12 at 07:44 PM

Seen: 687 times

Last Updated: Jul 31 '12 at 12:41 PM