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 ina · Mar 16, 2011 at 03:56 AM · meshproceduralmeshcollidermeshfilter

Generate a highpoly sphere with mesh collider procedurally

How do you generate a highpoly sphere procedurally with a mesh collider that fits?

Comment
Add comment · Show 2
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 Noah-1 · Mar 16, 2011 at 04:08 AM 0
Share

What do you mean? to create the sphere with higher poly in unity? Or you just want to create a sphere with high poly in blender (export it) and then just attach a mesh collider in Unity.?

avatar image ina · Mar 16, 2011 at 04:54 AM 0
Share

How do you generate the sphere mesh procedurally using mesh loops

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Mar 16, 2011 at 04:17 AM

If it should be a perfect sphere you shouldn't use a meshcollider. Meshcolliders are slow and can't collider with other meshcolliders. Just use a SphereCollider.

To create a sphere mesh you can just use some trigonometry (sin / cos) to calculate the vertices. To setup the UVs take a look at the UV mapping article on wikipedia.

Maybe you can go a bit more in detail what you wanna do. If you want to create a planet surface then you would need a meshcollider. After you created your mesh, just assign it also to the meshcollider. That should be enough.

Comment
Add comment · Show 3 · 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 AquaGeneral · Mar 16, 2011 at 05:54 AM 1
Share

Exactly, the last thing you want to do is use a meshcollider when the shape is just a sphere. Especially since a sphere is the fastest collision primitive possible.

avatar image ina · Mar 16, 2011 at 08:42 AM 0
Share

what if you want high poly - spherecollider has limited resolution iirc

avatar image Bunny83 · Mar 16, 2011 at 11:10 AM 0
Share

What do you mean with limited? A sphere collider is infinite accurate as long as it's a sphere. If you want an irregular surface you would need a meshcollider. What does your "sphere" look like?

avatar image
0

Answer by Noah-1 · Mar 16, 2011 at 04:10 AM

Hello.

If your mesh collider is smaller than your sphere you can atach the mesh collider to an empty gameObject then just scale it to the same size of the sphere and attach it.

Good Luck.

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

No one has followed this question yet.

Related Questions

MeshCollider is not getting updated when adding vertex to mesh 1 Answer

Save previous state of mesh procedurally 1 Answer

AAPT Failed! 0 custom asset files in raw for Procedural Examples Paint Vertices to Android 2 Answers

Way to erase meshfilter mesh and rewrite it? 1 Answer

Copying the mesh, collider, and material of a procedurally generated GameObject 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