Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Animating a Flag

Discussion in 'Editor & General Support' started by onedong, Mar 2, 2010.

  1. onedong

    onedong

    Joined:
    Aug 27, 2009
    Posts:
    32
    Ok i am having trouble animating a flag in unity. All i am trying to do is take a flag in max and make it look like its blowing in the wind. so far i have done it with trying ripple and wave modifier and keyframing them but unity does not pickup the animation. i also have animated it in max using wind and gravity but unity doesnt play the animation. i then tried to just manually move the verts to just get an animation on it, but unity will not play the animation. what is the easiest way to animate an actual flag, not render it to a plane. i want the flag to actually move.
     
  2. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Unity does not support vertex animations like that (morph targets, what you're doing, and so on). Unity only supports transform-based keyframe animations or skinned/rigged character animations. If you want a flag waving in the wind then you'll likely have to bring in your static flag model then write a bit of code in Unity (JavaScript or C#) and animate it procedurally.
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Try using this shader.

    --Eric
     
  4. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Touché Eric, thanks for that link!
     
  5. onedong

    onedong

    Joined:
    Aug 27, 2009
    Posts:
    32
    wow thx, i had totally forgot about this since i was working on another project but im gonna go back and try out the shader and see how it works.