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 konrad.bajtyngier · Feb 01, 2015 at 05:33 PM · collidermeshmeshcollider

Mesh Collider not colliding

Hello everyone! I am new to Unity, so I hope my question won't be out of place here. I have been searching for a solution to my problem, but haven't found anything that would solve it. Decided to give it a shot and ask.

So, what I am aiming for (in 2D) is to make different color squares fall down and stack one on top of another. I am using Meshes to programmatically create squares. I create them in the Start() method of a GameObject I place in a scene. Since this object has a Rigidbody2D, Unity does not allow me to attach a Mesh Collider directly to it. Hence, I have added another GameObject that sits within the first one and has a Mesh Collider attached to it. In the code, where I create a Mesh, I also assign it to the Mesh Collider from the second GameObject.

The collider is being created and I can see it (the green lines) when I run the project. However, it does not collide with any other colliders. For example, I have a bottom surface as a simple wide Box Collider, but my square just falls through it.

I assume, I am missing some Unity knowledge, but I am not sure where to look for answers any more. It would be great if someone could suggest a solution or point me where I could find an answer. 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

1 Reply

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

Answer by konrad.bajtyngier · Feb 02, 2015 at 12:53 PM

I will answer my very silly question myself. Mesh Colliders work only within the 3D physics engine, so they cannot collide with my Box Collider 2D.

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 konrad.bajtyngier · Feb 02, 2015 at 01:26 PM 0
Share

also, if someone is as unexperienced as me and thinks $$anonymous$$esh Colliders are a good choice in a project like that, don't use $$anonymous$$esh Colliders and simply add a Box Collider 2D in code:)

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

2 People are following this question.

avatar image avatar image

Related Questions

Collision mesh data problem in Unity WebPlayer 2 Answers

Particles going through mesh collider 1 Answer

Correct position of overlapping meshes 0 Answers

Problem with convex Mesh Colliders 0 Answers

How to make a trigger when a Collider hits a different collider 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