Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Effector2D physics performance

Discussion in 'Physics' started by imaginaryhuman, Feb 13, 2015.

  1. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Just a quick note to say that I have a project which needed a lot of conveyor belts, to move objects along, and implemented it with `rollers`, like 5 rollers per block. The rollers had to rotate with a script, and have a physics material with some friction. Performance was not super great.

    When I switched out these for surface effectors (unity 5), applied to a single rectangular 2d collider, physics performance more than doubled! So now my scene which was `too slow` even for my iPad Air, is now running nice and smooth. Thanks Unity!
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,105
    You're most welcome. Effectors are pretty efficient simply because they hook-in at a low-level and consume contacts that apply to them as they happen so they don't need to check for applicable stuff each physics update. This also means that from a 2D physics update point-of-view, they take zero cpu overhead if nothing is in contact with them.
     
  3. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Yah the proof is in the pudding... they are definitely a more efficient, and easier to use addition.