Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 RLin · Aug 01, 2015 at 09:24 PM · rigidbodycolliderlagmeshcollider

Does collider size affect performance?

Situation 1:

There are two box colliders, both static. One is of size 1 x 1 x 1 and the other is 10000 x 10000 x 10000 in size. Will the large one cause lag?

Situation 2:

Same setup, but they now both have now have a non-Kinematic rigidbody with mass one. Will the larger one lag?

Situations 3 & 4:

Same as situation one, but using mesh colliders. One is scaled to 10000x its normal size. Will the larger one lag?

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 Hexer · Aug 01, 2015 at 09:47 PM 0
Share

No it won't.

What does affect performance are, light and the polycount of a mesh.

avatar image Positive7 · Aug 01, 2015 at 09:55 PM 1
Share

Instantiating a mesh collider with custom scale at runtime might be slow.(Afaik) So try too avoid that.

1 Reply

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

Answer by zach-r-d · Aug 01, 2015 at 09:58 PM

It's hard to say if any of those situations individually would cause lag to appear where previously there was none. As for whether it will affect performance, the answer ultimately depends on the underlying implementation of the physics engine. More specifically, it depends on the spatial acceleration strategy/data structure being used. With no spatial acceleration (i.e. n-squared collision detection, where every object checks every other object for collision), it wouldn't matter, but Unity/PhysX certainly does something smarter. But regardless of the exact spatial partitioning strategy used (whether it's an octtree, kd-tree, or otherwise), the fact is that the larger a collider is, the more things there will be that need to check if they are colliding with it. So in that respect, yes, collider size will affect performance. Making the collider use a rigidbody (making it dynamic) will be an additional hit, as will making it a 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

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

25 People are following this question.

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

Related Questions

Is there ANY possible way to use a mesh collider(without convex) with a rigidbody? 1 Answer

Anyway to make my object not fall through the floor without convex? 0 Answers

Why doesn't my mesh collider collide while a capsule or cube collider works fine? 2 Answers

Stop rigidbody from moving after it falls on another rigidbody 1 Answer

Workaround to Non-Convex mesh colliders with non-Kinematic RigidBodies? 1 Answer


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