x


How would I script a simple path animation in C#

I want to make a movement animation script to move an object from point a to point b to point c and so on, with different durations for each. How would I do this ?

more ▼

asked Jul 07 '12 at 01:17 PM

maggot gravatar image

maggot
190 26 28 36

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

1 answer: sort voted first

Have a look at Animations via YieldInstructions. There's a bunch of tutorials out there for that. You may be able to use an array to store the waypoints (as Transforms) and then Lerp your object between those Transforms.

more ▼

answered Jul 08 '12 at 12:11 PM

ProudOne gravatar image

ProudOne
116 2 2 5

Yes, I was going to use arrays to store waypoints and durations. Yield can be useful as an alternate to stop movement, but I was looking for how to store and use the time taken to go between the two points. For example how would I code it so that it takes an object 2.3 seconds to move from point a to point b. Lerp does that eg Vector3.Lerp

Thanks !

Jul 08 '12 at 12:38 PM maggot
(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:

x3807
x3340
x1371
x36
x9

asked: Jul 07 '12 at 01:17 PM

Seen: 525 times

Last Updated: Jul 08 '12 at 12:38 PM