Search Unity

Question Unity Physics problematic performance based on scale

Discussion in 'Physics for ECS' started by Occuros, Feb 24, 2023.

  1. Occuros

    Occuros

    Joined:
    Sep 4, 2018
    Posts:
    300
    We noticed that the scale of objects has a huge impact on performance.

    We create procedural terrain and use mesh colliders for the physics interactions. If we use standard scales for the world and the characters, performance is very problematic, but if we scale up everything by a factor of 100, performance is excellent.


    Is there a way to modify the physics engine settings to instead of scaling the world, scale the simulation in a way that would behave similarly as if we would have scaled up the world by a factor of 10x, 20x, 100x, etc.?
     
  2. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    867
    Sounds very strange maybe you should make a bug report and include ECS in the report name.
     
    daniel-holz likes this.
  3. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    700
    I noticed the same for certain scales, perhaps the BVH Unity Physics creates is subdivided based on fixed steps, rather than relative subdivisions?

    Especially Meshcolliders drag down performance immensely (even vs. a single entity) if at the wrong scale.
     
    Occuros likes this.
  4. daniel-holz

    daniel-holz

    Unity Technologies

    Joined:
    Sep 17, 2021
    Posts:
    278
    That sounds indeed strange. We would very much welcome a bug report with a project that reproduces this issue, if possible.