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
1
Question by siddharth3322 · Jan 11, 2016 at 10:38 AM · unity 53dwater

Object bounces around as if in water

I want behaviour of an object as if in a tank, as if bouncing around in water

Basically I am trying to create something like this https://www.youtube.com/watch?v=HA3cr4-Fadw

I think, I don't need to create actual water in this. Only illusion of movement in water is enough for me. Can you give me more suggestion to achieve this kind of stuff?

Comment
Add comment · Show 1
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 Fattie · Jan 11, 2016 at 12:31 PM 0
Share

That is very, very difficult.

Note that "water" packages for Unity "merely" mean simulating the surface of some water.

I believe you actually want to SEE THE WATER in a fish tank "from the side" right, including sloshing.

This sort of thing - for example in CG movies, etc - is done with a "multi-physics" package such as Bullet Physics http://bulletphysics.org/

It really has nothing to do with game engine -type physics (like PhysX in Unity).

It's very likely you'd have to make a simplification of your issue and work on that


NOTE the op has explained they DO NOT WANT TO SEE THE WATER, they only want to see AN OBJECT IN WATER, that is to say acting buoyant.

1 Reply

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

Answer by Fattie · Jan 11, 2016 at 03:35 PM

Fortunately this is very simple.

Make a cube, now make it "flat",

so for example 10cm long (that's 0.10 units, you must use natural one meter units), 8 cm deep and say 1cm thick.

Make six of these so that you form a "box", just as in your example.

On the one near the camera, simply eliminate the renderer, so of course you can see through it.

Put a ball inside.

Be sure to turn on gravity. In the first instance just sit the ball at the top and hit Play, notice it bounces down correctly.

What you must now do is make it so that when you turn the phone around, the box turns around.

You will find 1000s of QA about this on here, just google.

It will now work perfectly as you spin the phone.

There's only one more thing to do:

(1) add some drag to the rigidbody of the ball

(2) change gravity setting (likely, lessen gravity)

You may or may not need to do one more thing. Simply add a random small force, either "left" or "right" which has a random size and goes off randomly every about .75 seconds. You'll find that looks exactly like inside-water motion.

Enjoy!


NOTE...

Also, be sure to simply look in the asset store, and on free wikis etc, for simply

A BUOYANCY PACKAGE

if you can find a "buoyancy" script or asset, you're done. Just (1) attach the buoyancy script to your ball. (2) do what I mention above about "turning the object over when the phone turns over"

Enjoy! Aacha

Comment
Add comment · Show 6 · 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 siddharth3322 · Jan 11, 2016 at 03:37 PM 1
Share

Thank you so much for all this, sir. Sorry for some of my misleading content previously.

avatar image Fattie siddharth3322 · Jan 11, 2016 at 03:39 PM 0
Share

no problem, hope it helps. also see my edit.

PS the shader is irrelevant here. use any shader you like that looks good. I very strongly suggest using Unity5 here, do not start with Unity4.

avatar image Fattie Fattie · Jan 11, 2016 at 04:11 PM 0
Share

"On the one near the camera, simply eli$$anonymous$$ate the renderer, so of course you can see through it."

Look at the Inspector. Look at the component called $$anonymous$$eshRenderer. Look at the top left. There is a check-box. Turn the check off.

Of course you have to do this, or, you camera will not be able to see-through that "wall"!

Create six walls (use "flat" cubes) to make the box. Of course, make the "front" wall invisible so the camera can see through it.

Show more comments
avatar image siddharth3322 · Jan 11, 2016 at 04:14 PM 0
Share

Okay Thanks!!

Next time reply me please :)

Right now I have to use google for this.

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

42 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 avatar image avatar image

Related Questions

Getting 'bouyancy' on water to work. Help! 0 Answers

Can unity only show some specific color? 2 Answers

How do I get a character to move (Without the default scripts, which don't seem to work)? 1 Answer

How do i Gizmos.drawLines in an order?? 2 Answers

Object Jump 0 Answers


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