Search Unity

I need tens of objects (cilinder mesh cooliders) interacting, is it possilbe?

Discussion in 'iOS and tvOS' started by hexdump, Dec 17, 2012.

  1. hexdump

    hexdump

    Joined:
    Dec 29, 2008
    Posts:
    443
    Hi,

    I'm creating a game where I need physical interaction between tens of objects, I think the average will ge around 50. Is this possible to accomplish with 3gs devices? My colliders should be cylinders but we all know unity (physx) doesn't provide such primitive, so, I should use a mesh collider. Every mesh collider should be a cylinder of 12 sides. I have seen other games on the store (not unity) that do this and they work nicely. Has anybody tried to accomplish something like this with success on unity?

    P.D. I have done some tests with 80 objects with a mesh collider created from a unity3d cilinder and it really lags. Could anyone give any insights please?

    P.D. More data, I have just left 40 objects with just box colliders and still lags a lot. Don't really know how I could get this better. On the other hand I have lowered the physics iteration to 3 too.

    Thanks in advance.
     
    Last edited: Dec 17, 2012
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    If you can use a sphere collider and get close, that may help your speed quite a bit. How are your draw calls?
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You need to set your solver iteration count low, your fixedupdate rate low and stick to spheres or box colliders, and it should be fine, yeah. Keep sleep fairly high.