Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by Aggressor · Sep 02, 2012 at 01:43 AM · shadertexturesanimationshealthbardynamic mesh

Create Dynamic Flapping Flag (that can resize)

Greetings fellow Unity tinkerers,

I have a rather interesting problem I was hoping to gain some insight into a possible solution to.

I would like to create a flag that flaps in the wind...but also resizes!

See I plan to have the flag represnt a units health, and as it takes damage the width of the flag decreases.

Is there a way to have the flag both animate (flapping) but resize its width (and add damage tears) to it?

If it were static of course I could just use an animation call, but since its resizing as it takes damage Im puzzled about the best way to approach this.

My skill level is intermediate with C# & Unity so I'll probably understand almost anything you can suggest :)

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Fattie · Sep 02, 2012 at 08:20 AM

it's very easy to resize it, just use localScale

no problem with localScale'ing a playing complex animation

regarding "doing damage" that's always difficult. basically it's quite simply .. a different object.

in this situation, just have yer art department make say 20 different versions of the flag, in various humorous states of degradation. that's about all you can do!

(You could get in to like repainting the texture on the fly with tatters etc, but it seems absurd here to suggest that.)

As a rule "progressive damage" is very simply you build and swap out a series of models. Hope it helps!

PS I'm sure you're aware there are many "flapping flag!" animations sitting around, many free

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jamesies101 · Sep 02, 2012 at 08:38 AM 0
Share

@Fattie thanks.

avatar image Aggressor · Sep 02, 2012 at 12:56 PM 0
Share

Gotcha, so I could have say 5 flag states. Each of them can be the same length, but just add more damage to successive models. So model 1 is used at 100%, model 2 used between 80-99.9%, another 60-79.99%, etc. And the models could feature more and more freyed edges and $$anonymous$$rs. And I could use the same localscale.x (I was concerned about warping though). But I figure this is the best overall bet. Only 1 way to find out! Thanks

avatar image Fattie · Sep 02, 2012 at 01:49 PM 0
Share

sounds great!

you could even forget about the scale, and just make the 5 or 10 models, different sizes. then it's all done in one. (if that fits your scheme.) Cheers!

Your answer

Hint: You can notify a user about this post by typing @username

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

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Effects of Graphics.Blit to rendertexture are temporary 2 Answers

Shader and normal map working when editing, but sprite turns black when running with animations 2 Answers

poor performance is slowing down the rate 1 Answer

Help with GUI, Textures and Materials (Health Circle) 1 Answer

How to create Timer animations? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges