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
1
Question by Richard 3 · Feb 22, 2011 at 06:03 AM · collisionrigidbodycolliderscollide

stop objects moving through each other

I have a scene where I drop about 30 balls into a cylinder (like a bucket) , They are rigidbodies with sphere colliders. The cylinder is also a rigidbody with mesh collider.

My problem is some of the balls pass through the bucket. Is there a simple way to solve this problem? I don't want to slow the balls down too much.

Thanks

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

5 Replies

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

Answer by Azound · Feb 22, 2011 at 07:33 AM

If your balls are going to fast to collide with the bucket, you should change the collision detection on the bucket's rigidbody to "Continuous" and the collision detection on the balls' rigidbodies to "Continuous Dynamic." That will make the physX engine use more advanced math to determine collisions than just checking whether the ball is inside the mesh at that particular moment.

Your other option would be to edit the project's physics properties to change the fixedUpdate time to be a smaller amount of time (though this will cause fixedUpdate to get called on each of your gameObjects more often, which may slown down the game as a whole, but could be less costly than having lots of "Continuous Dynamic" objects in your scene.

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
Best Answer

Answer by Richard 3 · Feb 22, 2011 at 07:36 AM

The answer is really simple, just use this script from the Unify Wiki link text

Just add the script to the moving object with the problem. The put the obstacle on a separate mask to the moving object.

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 Dmitriy · Feb 22, 2011 at 09:54 AM

Try Use "Convex" in "Mesh Collider".

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 fmrtp · May 29, 2014 at 11:20 AM

-Edit ---> Project Settings ---> Time ... decrease "Fixed Timestep" value .. This will solve the problem but it can affect performance negatively.

-Another solution is could be calculating the coordinates instead of using collider. For example, you have a ball and wall and ball will hit to wall. So calculate coordinates of wall and set hitting process according these cordinates).

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 rootPL · Apr 30, 2017 at 09:53 AM

Hmm I solved mine issue with removing rigid body components from walls :)

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

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How to make two colliders or rigidbodies stick together upon collision, as if there was a glue on their surfaces? 3 Answers

Avoid Rigidbody Intersection 1 Answer

Rigidbody trapped in collider after collision 1 Answer

How can I simulate a realistic collision between a metal axe and a door and prevent them from passing through each other? 1 Answer

Collision between player and static object doesn't work as intended 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