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 /
avatar image
0
Question by Unity Noob · Aug 19, 2010 at 04:56 PM · collisionrigidbodyfalling

Why does the object keep falling?

i have two objects, a drinking can and a bucket. can = rigidbody + box collider bucket = mesh collider

when the can goes into the bucket it's fine and it satys inside the bucket, but after you start moving the bucket the can starts falling down. I also tried enabling the convex option for the bucket but it's not working

how can i prevent this from happening?

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 HolBol · Aug 19, 2010 at 08:57 PM 0
Share

tags like 'help' and 'please' really aren't that descriptive. Try and keep them on the subject of your question.

2 Replies

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

Answer by Loius · Oct 05, 2010 at 04:41 AM

You may need to alter your Physics settings -

Edit->Projet Settings->Physics

You might try decreasing Min Penetration For Penalty or increasing Solver Iteration Count.

The problem may also be caused by having a bucket that is very thin. I believe increasing Solver Iteration Count will help with that, though there's a limit to what it can do. A better solution might be to thicken the bucket walls.

If that doesn't help, you may try the parenting suggestion above, and disable the can's movement by settings its rigidbody.isKinematic = true while it's in the bucket (though that has its own disadvantages).

Comment
Add comment · 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
0

Answer by xToxicInferno · Aug 19, 2010 at 07:58 PM

Alright the best way to do this is put a collider (sphere maybe) inside the bucket. Now tag that collider something like 'canDetector' and make it a trigger. You can also delete the mesh renderer and filter. Now use this code and apply it to the can:

function OnTriggerEnter (other : Collider) { if(other.gameObject.tag == "canDetector") { transform.parent = other.transform; } }

function OnTriggerExit (other : Collider) { if(other.gameObject.tag == "canDetector") { transform.parent = null; } }

Or alternatively you can have it so that the bucket detects the can (that way you can have more than just the can in the bucket, which keeps you from making more scripts) which may be the better way of going about it. Also, just so you know the problem is that logic says when one object pushes against another object it will move with it (i.e. elevator goes up, you go up) but inside of Unity, if the object in motion is NOT the parent of the object inside, they will simply pass through each other. Good luck and have fun. Also make sure you detach the object from each other or problems may arise later on!

Comment
Add comment · Show 2 · 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 Unity Noob · Aug 19, 2010 at 08:44 PM 0
Share

thanks, but when the can collides it just falls through the object...

avatar image xToxicInferno · Aug 20, 2010 at 03:03 AM 0
Share

Is the can a rigidbody or are you using a different method to get the can into the bucket?

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

No one has followed this question yet.

Related Questions

Snapping falling objects with rigidbody to grid 1 Answer

Help with character controller collision... 2 Answers

Problem with collision - Collision.other.gameObject is obsolete 1 Answer

Having trouble turning a Transform movement into a Rigidbody force. Code included 1 Answer

Rigidbody Collision? 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