x


Rendering a spring joint

Helloh!

I am trying to make the spring joint constraint on a cube visible, that is I have a cube with a spring joint on it and want a line to be rendered between the joints anchor point and the center of the cube. It needs to be dynamic so the line follows the cubes movement.

I have experimented with a Line Renderer on the object but cannot get the second 'element' to dynamically follow or read the cubes vector position.

Any help would be greatly appreciated!!

more ▼

asked Jun 11 '11 at 07:57 AM

operand gravatar image

operand
16 5 5 6

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

1 answer: sort voted first

I've since figured this problem out for myself by using this as a guide: http://forum.unity3d.com/threads/34614-Line-Renderer-Newbie

I removed the last 3 points+positions and also added a few conditions to prevent the line from rendering once the joint breaks.

more ▼

answered Jun 13 '11 at 08:33 AM

operand gravatar image

operand
16 5 5 6

(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:

x266
x146
x123
x31

asked: Jun 11 '11 at 07:57 AM

Seen: 1276 times

Last Updated: Jun 13 '11 at 08:33 AM