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 sandworm · Oct 26, 2011 at 04:05 PM · rigidbodycolliderchildprofilerstatic

Unity creating static colliders

I have a camera with a few colliders attached to it that flies around throughout the scene. It's a little jumpy, and when investigating it in the profiler, I found it was doing static collider moves. My object contains box colliders (none static), but no rigidbodies. Somehow Unity is considering this a static collider move and grinding my performance. Is there any way around this?

Please see the related forum post: http://forum.unity3d.com/threads/75560-Unity-is-creating-static-colliders-on-load.

In the above post, there was mention of removing rigidbodies from child objects to work around this issue, but since I don't have rigidbodies, I cannot follow this advice. I DID try adding a kinematic rigidbody to the camera, which did fix the problem, but slowed my game down to a crawl.

Does anyone have any suggestions? I need to get this fixed asap!

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
3

Answer by jonas-echterhoff · Oct 26, 2011 at 06:15 PM

"Static Collder" refers to any collider without a Rigidbody. Since you said that you don't have Rigidbodies, you have static colliders.

Basically, in PhysX, everything which is expected to move needs to have a Rigidbody. If you don't want physics simulation to move the object, just set the kinematic flag in the Rigidbody. Colliders without a Rigidbody are expected to stay in place, and are organized in a big data structure for finding colliders in the world quickly - this data structure needs to be rebuilt when you move the collider, thus the performance hit. Besides, the simulation tends to be more stable when you use kinematic Rigidbodies on colliders you move around.

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 sandworm · Oct 26, 2011 at 06:44 PM 0
Share

Hmm, that sounds reasonable. Last time I added a kinematic rigidbody to the camera however, it slowed my performance quite a bit. Any idea why that might have happened?

avatar image maciekish · Feb 29, 2012 at 04:32 PM 0
Share

But which type of object needs to have a rigidbody? Anytime you move a transform, or only if it has a collider or perhaps mesh renderer or something like that?

avatar image numberkruncher · Mar 28, 2012 at 12:43 PM 0
Share

I have some scene objects that have colliders to detect when they have been shot. They have static colliders because they do not move in any way...but they do get destroyed. Does this mean that they should have rigidbodies as well?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Add sub object to Rigidbody 1 Answer

Controll squeeze of rigidbody between static collider and kinematic rigidbody. 1 Answer

Get all child not working? 1 Answer

Is the child collider still static even if I parent them with a rigidbody ? 2 Answers

Physics.SphereCastAll to get rigidbody's like OnCollisionEnter 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