Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Weird Problem With 'Generate Colliders' and game lagging

Discussion in 'Editor & General Support' started by r1fts, Apr 3, 2014.

  1. r1fts

    r1fts

    Joined:
    Apr 3, 2014
    Posts:
    4
    Hello Everyone,

    I'm using a few models from blender. I'm clicking Generate Colliders and everything seems ok unless I use it's animation then my game has massive lag.


    If I use the animation but uncheck 'Generate Colliders' everything is fine and smooth. I need the colliders so I can collision detect it?


    What am I doing wrong?


    thanks
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Remove "generate colliders" from meshes used for anything that moves. Only use primitive colliders for moving objects, not mesh colliders.

    --Eric
     
  3. r1fts

    r1fts

    Joined:
    Apr 3, 2014
    Posts:
    4
    Hey Eric thanks for the response, sorry I'm pretty new to unity but that is really the only way to do it?

    What about for complex shapes?
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    For complex shapes you can use compound primitive colliders. Also possibly convex mesh colliders, but those are limited to 255 triangles or fewer.

    --Eric