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 Hedonsoft · Jun 20, 2012 at 10:27 PM · collisioncollidermodel

Objects going partway through each other

Hello everyone. I've exported some building block shapes from Max and in Unity I've tried box and mesh colliders on the objects but they pass partway through each other when they collide, the collision is happening at the center of the mesh rather than the outside. The collider surrounds the mesh. A screenshot of what I mean can be found here.

https://dl.dropbox.com/u/33377838/screenshot.jpg

Comment
Add comment · Show 4
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 · Jun 21, 2012 at 12:50 PM 0
Share

could it simply be Edit -> Project Settings -> Physics -> note the various settings for penetration, solver etc.

avatar image Justin Warner · Jun 21, 2012 at 01:00 PM 0
Share

If they're just box items (What it looks like), use the box collider for those, and not the mesh collider. $$anonymous$$ore accurate I've found.

avatar image Hedonsoft · Jun 21, 2012 at 02:28 PM 0
Share

Thanks Fattie. I even tried creating regular cubes and it was still happening so I had to drop the $$anonymous$$in penetration down to .00001 and put the iteration count at 10. Box colliders work ok for these shapes but I do have other shapes that will require mesh colliders.

avatar image whydoidoit · Jun 24, 2012 at 05:48 AM 0
Share

Bear in $$anonymous$$d that $$anonymous$$eshColliders are subject to back face culling - that limits their use when not colliding with a first/3rd person character (i.e. enemy/enemy collision etc).

2 Replies

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

Answer by TheDavil86 · Jun 21, 2012 at 01:04 PM

Well I can say that if they're using mesh colliders and you have a rigid body component attached to them they will go through each other if "convex" is not checked in the mesh collider properties. But if you're using box colliders they should work as long as the boxes are set up right. Try recalculating normals maybe if none of that works.

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 WarmBiscuit · Sep 27, 2017 at 04:09 AM

I was having this same issue making a 2D game. So if anyone is having this problem in 2D, I've found one solution:

Go to Edit >> Project Settings >> Physics 2D >> Then change the "Position Iterations" from 3 to about 8. This ups the iterations that check the positions of things, like your player's movement.

I was moving my main player with rigidbody.transform.Translate((Vector3.right moveThrust) Time.deltaTime, Space.World); and my player would go halfway into walls as I moved him around. But upping the Position Iterations fixed that problem.

The downside to this, is that it makes your program more costly memory-wise. So it may not be the best way to fix the issue, but I couldn't find any other solution...

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

7 People are following this question.

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

Related Questions

How to automatically add physics/colliders to a model of a map 1 Answer

Destroy On Collision will not work with spawned AI 1 Answer

How do I change the collision in showcase the book of the dead? 0 Answers

collision error 0 Answers

Concave collision issue with 2D game 3 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