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 r_chevallier · Jun 24, 2015 at 10:48 AM · rigidbodycollidersstatickinematic

Rigidbody.isKinematic vs. moving a static collider via script

Hello,

I have a question about performance.

Since everything has change with the Unity 5 physics (I am refering to the improved physics performance in Unity 5 in all areas stated in my question). I am wondering what the best practices are for mobile?

Unity 5 states that it has improved performance in both the ability to have more Rigibodies in a scene and in moving static colliders without rigidbodies(This use to be a big problem to process).

Below I will state 2 different scenarios and would appreciate feedback from anybody that might know the correct answer.

Scenario 1) - I have a scene with a 150 Rigidbody objects(all are instances from 4 different prefabs). Only 5 to 10 are in motion at the same time with gravity turned on. The rest have isKinmatic turned on with no gravity but have the potential to move if triggered. If they are triggered isKinematic is disabled temporarily and gravity is enabled temporarily until the object stops moving(then they revert to isKinematic and back to no gravity). All of these objects have a box collider.

vs.

Scenario 2) - Having a scene with 150 collider game objects with no Rigidbody. All of the game objects have the potential to move via script but only 5 to 10 will be in motion at the same time.

Scenario 1 is easier to create. Scenario 2 is more complicated scripting wise. I would like to know is there a big difference between the two scenarios in how heavy the processing is or since I have isKinematic turned on for most of the objects in scenario 1 does this even out the two scenarios?

Thanks in Advance-

Comment
Add comment · Show 1
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 hexagonius · Jun 25, 2015 at 12:35 PM 0
Share

I would say you answered the question yourself:

  • Scenario 1 is easier to handle, use it

  • Test Scenario 1 before thinking about optimization. Works right out of the box and won't cost that much time for a later switch to 2.

  • PhysX is highly optimized and calculates motion faster due to the natively compiled code. I'd also suppose it uses data driven design at its core which makes such operations even faster.

  • Rigidbodies that don't move sleep anyway so there's not even a need for setting them is$$anonymous$$inematic (and the threshold can be tweaked too)

Hope I could give some insights from what I know :)

0 Replies

· Add your reply
  • Sort: 

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

How do I grab an object without going through it? 0 Answers

Rotating a transform with child rigidbodies 0 Answers

(2D) Can't use colliders when I have a kinematic rigidbody? 1 Answer

Can i Move/Rotate triggers without Rigidbodies? And other collider questions. 3 Answers

Controll squeeze of rigidbody between static collider and kinematic rigidbody. 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