Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by Andrei T. Ursan · May 23, 2011 at 08:43 AM · animationcollisionphysicsiosbestpractices

What is the best practice in handling scenes with 100+ rigidbodies and collisions on iOS?

I have a scene with lots of houses and other objects. These objects will be bombarded from the sky. How to you handle these kind of sets having in mind that you want the physics to be as realistic as posible.

If I set all the objects with isKinematic=true and on Collision I set it to false, than the physics isn't as realistic as I want to... Can you have these kind of scenes on iPhone? Should I have animated objects? I really don't know what is the best practice in this kind of scenes....

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 Mnescat · May 23, 2011 at 11:54 AM 0
Share

kudos to the very clear and explanatory title. +1

1 Reply

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

Answer by demize2010 · May 23, 2011 at 09:16 AM

First up define lots ;)

Performance on mobile devices is a challenge at the best of times... depending on what you are doing you may find that you run into trouble quite quick, all those physics calc's chew up cycles that are required for rendering as well.

Your target platform is key here, probably the best approach is to simple get the lowest spec device you will support and build against it incrementally as you develop the game. That way you'll be able to gauge the performance hit of whatever it is you are doing.

Check our your physics matrix and make sure that collisions are only being checked between required layers. Follow this logic for understanding how expensive different colliders are (from least to most):

Sphere > Cube > Capsule > Cylinder > Mesh

Comment
Add comment · Show 6 · 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 Andrei T. Ursan · May 23, 2011 at 10:47 AM 0
Share

Hi, I've edited the question, lots = 100+ objects. On the device my test with 200+ rigid-bodies hardly runs. But maybe I'm doing something wrong and I don't know what is the approach or if you can handle that many objects.

avatar image demize2010 · May 23, 2011 at 11:49 AM 0
Share

I think in short that's possibly way too much. It depends on your collider type. We've managed 60 on an Android 1ghz device using sphere capsules only - but it totaly depends on everything else your asking the CPU to do as well.

avatar image Andrei T. Ursan · May 23, 2011 at 11:55 AM 0
Share

I went to soon into the game saying "Woohooo Phyiscs, so awesome!". But from what you are saying I understand that I cannot have on an iPhone 3GS more than 50 rigidbodies + other animations and stuff. right?

avatar image demize2010 · May 23, 2011 at 01:02 PM 0
Share

It really depends on your game and whats going on to be honest. Everything is pushed through the CPU on most mobile devices, so graphics, sound, physics etc. That being said, you should be able to get away with 50 rigidbodies if they use primative colliders (eg sphere or box)

avatar image Joshua · May 23, 2011 at 01:40 PM 0
Share

Also, in these kinds of cases it's probably better to use your imagination and program creatively then to actually have a hundred active rigidbodies.

Show more comments

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

2 People are following this question.

avatar image avatar image

Related Questions

Questions about physics based combat (animation + collision, hinge joints++) 0 Answers

Getting collisions when using an animation to move an object? 2 Answers

Character animation/ragdoll problem 1 Answer

Animate Physics doesn't work 0 Answers

Collision,physics and animation problem? 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