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 /
  • Help Room /
avatar image
0
Question by mawak93 · Nov 18, 2015 at 12:34 AM · triggercolliderstriggerspipe

Pipe Game ... I have to trace water from source to destination

I have to make a pipe water game .

Like this one http://www.39games.com/arcade-games/the-pipe-game

But the problem is how do i detect when the water has successfully reached the destination.... if colliders then what logic to implement ? Should i make an object that goes through the pipes ?

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

2 Replies

· Add your reply
  • Sort: 
avatar image
-1

Answer by kenazossou · Jun 13, 2017 at 09:24 AM

Hi Mawak!!! I'm trying to the same thing like you do (i.e simulate water flow through pipes) with shader but I get an error whith water direction. Sometime, the shader goes through a bad direction. Could you help me please? Thank you!!!!

Comment
Add comment · Show 1 · 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 NoseKills · Jun 13, 2017 at 04:24 PM 0
Share

This "answer" does not answer the question....

avatar image
0

Answer by _Game_Dev_Dude_ · Nov 18, 2015 at 01:49 PM

Well I can tell you how the game you linked works. It basically splits the entire scene into a 2D grid of squares. The water then travels linearly along this grid and changes direction based on which piece is in the square. So you would set a starting square and an ending square and then whenever you want you tell the water to "Go". it would then travel along this grid according to what pieces it comes into contact with and if it ever makes it to the ending square, it has reached its destination and you win!

This isn't the simplest thing ever but it is a good problem to work through. Hope this helps.

Comment
Add comment · Show 4 · 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 mawak93 · Nov 23, 2015 at 05:59 AM 0
Share

I have already done the water stuff and it is flowing fine....now the problem is how to detect if water is not in pipe....saying that water is out of pipe then it should destroy....how to detect it...that if water is not in the pipe

avatar image mawak93 · Nov 23, 2015 at 06:02 AM 0
Share

i have already done the water stuff but now i want to check whether water is in pipe....if not then destroy gameobject.....how to detect that?

avatar image NoseKills · Jun 13, 2017 at 04:23 PM 0
Share

How to do anything greatly depends on how you have made your game, which you are not telling.

If you had made it using a 2D grid where each grid cell has a connection node on some of its sides (as i probably would've done), then checking if "water is in pipe" is just checking if following the connection nodes leads to the end grid cell or to an unconnected node.

avatar image kenazossou · Jun 14, 2017 at 09:47 PM 0
Share

Thanks _Game_Dev_Dude. I agree it's not simple. Currrently, I'm trying to place 2 empty game objet on each pipe segment and calculate the water direction to follow; then generate an uniform rectilinear motionthrough each pipe segment. Though the problem persists. The motion direction changes but not yet in the right direction.

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

6 People are following this question.

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

Related Questions

How do I detect a collision between two objects using Bolt? 1 Answer

OnTriggerEnter not firing 2 Answers

Calling "OnTriggerEnter" when a parent object has a rigidbody 0 Answers

Problem With Triggers? 0 Answers

Enemy Trigger Colliders are triggering my player's trigger collider. Why? 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