x


Can I make animations snap to a frame?

When I import animations from Maya, I bake all the keys for all objects and save the file to Maya Binary format, but I get lots of problems when I play the animations, f.e if I do animation with replacing technique , like replacing the mouth in one frame when I play the animation in Unity the animation will play some inbetween frame that shows the mouth dislocated. I guess this is because Unity is playing the animation based on time and not on frame, but is there a way to make it Snap to a frame?

In Maya, the way to achieve this is to make all keys Stepped which means no interpolation between frames all transformation remain static until next keyframe is reached. but Unity (at least Unity iPhone) does not recognize this kind of interpolation.

more ▼

asked Oct 25 '09 at 09:06 AM

UVRadiation gravatar image

UVRadiation
138 2 4 10

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

1 answer: sort newest

If you want to only sample an animation at times that are snapped to frames, you must manually set the time of the AnimationState of the relevant clip in the Update function. In order to snap to frame x, set the time to x / frameRate. You can get the framerate from the AnimationClip.

more ▼

answered Oct 27 '09 at 05:18 AM

runevision gravatar image

runevision ♦♦
8.1k 29 46 112

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

x3806
x973
x400

asked: Oct 25 '09 at 09:06 AM

Seen: 6470 times

Last Updated: Oct 26 '09 at 10:18 AM