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
2
Question by dyankov · Nov 05, 2013 at 12:13 PM · charactercontrollerrpgrts

Performance with 100+ CharacterController's

Hi,

I'm making an RPG targeted for mobile devices and I made a few tests with more than 100 enemies. Each enemy has a CharacterController attached to it and I'm using Move() and SimpleMove() to steer them around. On a PC it runs smoothly, but on an iPad 3 I'm getting 15 fps at most.

I tried completely removing the CharacterController component from all enemies and moving them with transform.Translate and I'm getting 30-60 fps, but of course the player moves through enemies and the enemies move through walls.

To be sure that the problem doesn't come from the pathfinding I made a clean Unity project with 200 cubes with CharacterController and just set them to follow the player around. The result was the same - 15 fps at most. When I remove the CharacterController component I get more than 60 fps, so I think it's clear where the problem comes from. I even tried caching the transform.position, vector normalizations and other heavy calculations, even calculating them every second instead of every frame - same result.

So what is the standard way to approach this problem? I can imagine it's a common issue with every RTS and RPG out there. Please suggest some optimizations!

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 dreasgrech · May 13, 2014 at 08:50 PM 0
Share

I am curious on how you went about solving this. Did you eventually switch to a Rigidbody+Collider system ins$$anonymous$$d of Unity's CharacterController?

1 Reply

· Add your reply
  • Sort: 
avatar image
-1

Answer by TonyLi · Nov 05, 2013 at 03:53 PM

So the question is really how you can optimize Physics in iOS. Refer to this:

http://docs.unity3d.com/351/Documentation/Manual/iphone-Optimizing-Physics.html

Some people find improvement by reducing Solver Iteration Count from 7 down to 1: http://docs.unity3d.com/Documentation/Components/class-PhysicsManager.html

And just in general:

  • http://docs.unity3d.com/Documentation/Manual/iphone-PracticalGuide.html

  • http://docs.unity3d.com/Documentation/Manual/iphone-iOS-Optimization.html

Comment
Add comment · Show 1 · 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 dreasgrech · May 13, 2014 at 08:47 PM 0
Share

Hmm, not really. The question is about CharacterController performance, which is horrendous.

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

17 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

Related Questions

Inventory using a TXT file... Is it possible? 2 Answers

A node in a childnode? 1 Answer

Multiplayer in Action RPG, best approach? 2 Answers

100 animated enemies == 400 draw calls? 1 Answer

2D rigidbody movement & walls 2 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