• 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 bmahloch · Apr 24, 2010 at 07:14 PM · physics

Physics, Colliders and Custom Mesh

I'm very new to Unity so I hope I'm asking this question correctly...

I'm building a 2D game and want to apply physics to a game object that uses a texture that displays a 6 sided polygon. Basically I have a "stop sign" looking shape in the game. I'm a bit unclear what the best way is to get physics working against this "shape". Right now I'm using a GUITexture, applying a Rigidbody and Mesh Collider. The mesh collider is where I start getting confused. How do I assign the "mesh" property?

In general what is the proper way to go about this? Do I use a GUITexture? Do I dynamically create the mesh in script? Do I model the shape in another tool and import it?

Any insight is greatly appreciated.

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

Answer by qJake · Apr 24, 2010 at 07:59 PM

If your model was imported from a 3D modeling program, and you apply a MeshCollider, it will automatically assign the mesh to the collider. MeshColliders will only collide with certain types of objects, see the bottom of this page for a table of what collides with what.

If you want your MeshCollider to collide with more types of objects, tick the Convex option. This creates a convex collider around your mesh (though, if your mesh is already convex, this doesn't present a problem), and then it will collide with more types of objects than a standard mesh collider.

And the best way to go about modelling in Unity is to create the model in another program, and then import it into Unity. Unless your stop sign is procedural and MUST be generated via code, it's just a lot easier to do it in some 3D modeling program and then import it. Unity is a great game engine, but it's certainly not a 3D modelling application. ;)

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

2D 360 degress platformer example needed 0 Answers

Need help Adding Physics based recoil to my gun 0 Answers

Realistic collisions with a kinematic rigidbody? 1 Answer

Dynamic water Effects 1 Answer

HELP PLEASE PROBLEM WITH JOITS 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