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. Dismiss Notice

How to optimize Tree Coliders?

Discussion in 'Scripting' started by HawkZ, Aug 9, 2014.

  1. HawkZ

    HawkZ

    Joined:
    Aug 9, 2014
    Posts:
    4
    Hey guys ! I've added trees in my map (something like 25-30).

    When I add the Collision, I have a big fps fall!
    How do I optimize it?

    Thanks!
     
  2. Zackhanzo

    Zackhanzo

    Joined:
    Jun 5, 2014
    Posts:
    65
    It depends of how your gameplay is... i mean if its a FPS or TPS you can add a Capsulle collider just on the trunk of the tree. I think the problem is that you are using a mesh collider , isnt it?
     
    djfunkey likes this.
  3. HawkZ

    HawkZ

    Joined:
    Aug 9, 2014
    Posts:
    4
    First of all, thanks for Answer!

    Yes, I'am using a Mesh Colider for a perfect Collision :D
    My game type is FPS ^^'
     
  4. Zackhanzo

    Zackhanzo

    Joined:
    Jun 5, 2014
    Posts:
    65
    With mesh colliders you will get more lag than with capsule collider. And if you leaves are dynamic youll get a lagfest. You can remove that mesh collider and replace it with capsule colliders. You dont need attach the leaves to the collider so... you will be fine puting the capsule collider just on the trunk of the tree.

    In fact, you should put box or capsule collider in all colliders that you can. Of course if you cant, use mesh collider but that will generate u more lag .