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 Lord Simpson · Mar 24, 2011 at 08:52 AM · physicsperformanceoptimization

Improve Physics Performance For large Number of Objects

Hi Im in the process of porting over the beginnings of a game I've been developing in XNA but im running into a problem.

In my XNA game I was able to have many thousand bullet objects in my game at one time with little performance issues until I had more objects to collide with [infinite bullets but nothing to collide with should mean no processing time required] however in unity I'm only able to get a few hundred rigid bodys at max before the FPS drops below acceptable levels. Even if they are all set on a physics layer that cant interact with anything [so there should be no performance hit bar the drawing?]

EDIT[Changed to ray-casts and seams to be working well so ignore this section] So is there a "lite" version of the ridged body that will improve performance for a large number of objects or will I have to switch the bullets from ridged body's to a ray-cast script that test from the bullets point back to its previous point each update

Also does unity use any form of spacial partitioning [octtree] to improve performance in large scenes [bullets should not be tested for collision against something that's many miles away]. If not is there a sample round that implements it.

Comment
Add comment · Show 3
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 Statement · Mar 24, 2011 at 10:56 AM 0
Share

I'd bet PhysX uses octrees internally, but I am not all sure.

avatar image Peter G · Mar 27, 2011 at 10:06 PM 0
Share

I would also like to point out that you cannot develop for XNA with Unity.

avatar image Lord Simpson · Mar 28, 2011 at 10:27 AM 0
Share

Notice the "was" Im porting it over (reasonably easy since unity reads c#) as unity is much faster to work with.

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by Meltdown · Mar 24, 2011 at 09:54 AM

Try decreasing the 'Solver Iteration Count' in your projects physics properties.

Go to Edit -> Project Settings -> Physics

And change the value in there.

Comment
Add comment · Show 2 · 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 Lord Simpson · Mar 24, 2011 at 10:06 AM 0
Share

Since changing the bullets to raycasts this doesn't seam to impart any performance change. But thanks for the suggestion as I may have to look into this again

avatar image Meltdown · Mar 24, 2011 at 11:20 AM 0
Share

Ins$$anonymous$$d of using rigidbodies try creating rectangular cubes on the fly and attaching a box collider to them.

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

No one has followed this question yet.

Related Questions

Add 2d rigidbodies to moving objects to increase performance or not? 1 Answer

Mobile physics optimizations and Mesh Colliders 1 Answer

Physics calculates collisions between disabled layers 0 Answers

Character Controller's performance for massive groups 0 Answers

Understanding Raycast How Actually works in Unity [As Algorithm] 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