Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
0
Question by deuxieme · Mar 23, 2016 at 07:01 PM · 2d gamewindphysics 2d

How do I create 2D swirling wind patterns? (Use fluid dynamics?)

Hi guys,

We're making a 2D game and I want to test some 2D wind patterns which will swirl in different directions (so, not a simple horizontal directional windzone, but involving curves).

A good visualization for it is this Van Gogh painting:

alt text

... Imagine a player surfing along these wind currents in the air. The wind current should therefor be able to effect GameObjects physics (the player).

So, I'm not sure how to achieve this. I've been looking at fluid dynamics with directional force applied, but I'm not sure if that's going to allow the same 'feel' as wind. I've also looked at adding force along a spline bezier curve, but I'm not sure this makes sense.

How would you guys go about this? What should I research in order to get something like this working?

Also, it would be ideal if I could randomize these wind currents, but I realize that may be just complication things.

Thanks for reading!

1280px-van-gogh-starry-night-google-art-project.jpg (97.1 kB)
Comment
Add comment · Show 3
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 Brocccoli · Mar 23, 2016 at 07:23 PM 0
Share

So the player "surfs" along these wind currents. Is the player following the lines of the wind? Is the player "stuck" to these lines until they explicitly wish to "jump off"?

I kind of have an idea of what you want, but at the same time, I'm totally lost. Does the player have a parachute that is controlled by these currents? Or do they function a lot like Line Rider?

avatar image deuxieme Brocccoli · Mar 23, 2016 at 08:18 PM 0
Share

Hi Broccoli,

$$anonymous$$ind of neither. Ins$$anonymous$$d imagine a bird riding a wind current. They cruise along the wind and the wind pushes them in a certain direction, but if they flap they can get out of this current. (The player should feel 'funneled' along the wind current, but they can use the controls to exit if desired.)

They are not 'stuck' on this wind current, but imagine that the current is somewhat magnetic and has a slight force keeping them within the current, but they can break free of it as well.

Does that help? The key analogy is a bird riding a wind current.

avatar image Brocccoli deuxieme · Mar 23, 2016 at 09:14 PM 1
Share

That definitely clears a lot up.

I don't think there is anything in Unity that will give you this functionality out of the box.

What I think you'll want to do is encapsulate your own WindWave object or something. An object that encapsulates that WindWaves path through your game, and the "magnetic" property of that line.

The WindWave as I picture it has:

A line that denotes its path through the Scene

A width of "magnetic force" that effects the area evenly on both sides of the line

A strength of this "magnetic force"

Generating the line is your hardest part I suppose, it isn't quite a bezier curve as that seems to rigid for your needs, although this website seems like it might be helpful anyway, bezier curves might not be out of the question.

You could break up the generation of a WindWaveLine into general subroutines that draw PARTS of the WindWave, so a straight part, a curved part, a looped part, a looped part that goes down, a eliptical loop, etc. You could procedurally generate these different parts and put them together according to a set of rules, then draw the corresponding line onto the scene. You could get a more realistic feel by applying some trigonometric functions I suppose.

I'm kind of just talking out loud here. It's definitely an interesting problem and one that is going to require a lot of thought.

Hopefully I helped you out a bit.

0 Replies

· Add your reply
  • Sort: 

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

40 People are following this question.

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

Related Questions

Enemies in top down shooter being affected by physics of bullet 1 Answer

question about trees 1 Answer

Swipe Wind 2 Answers

Wind zone particle system exclusion possible? [shuriken] 0 Answers

Animated clothes 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