x


How to script a forever going swing?

Now that I have a configurable Joint and made sure my object would only rotate on the y angle, how can I use a simple script to let it swing back and forth eternally?

more ▼

asked Jan 22 '10 at 01:34 PM

Adriaan gravatar image

Adriaan
65 2 2 5

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

1 answer: sort voted first

You could use the Animation Editor:
Create an Animation Clip animating Rotation.y only, set the WrapMode to Loop or PingPong and attach it to the GameObject.

http://unity3d.com/support/documentation/Components/AnimationEditorGuide.html

more ▼

answered Jan 22 '10 at 02:12 PM

efge gravatar image

efge
5.1k 5 14 38

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

x5059
x2156
x2075

asked: Jan 22 '10 at 01:34 PM

Seen: 1812 times

Last Updated: Jan 22 '10 at 01:34 PM