Search Unity

How to set MeshCollider CollisionFilter.GrounpIndex???

Discussion in 'Physics for ECS' started by lijianfeng, Mar 12, 2020.

  1. lijianfeng

    lijianfeng

    Joined:
    Sep 8, 2015
    Posts:
    54
    I want to use the CollisionFilter.GroupIndex as my game Camp,but the MeshCollider don't let me to change the GrounpIndex.Will you fix it or I can't use GrounpIndex of MeshCollider?:mad:
     
    Last edited: Mar 13, 2020
  2. Adam-Mechtley

    Adam-Mechtley

    Administrator

    Joined:
    Feb 5, 2007
    Posts:
    290
    Can you share some more information about your use case? For example:
    • Are you needing to change the group index for the whole mesh, or on a per triangle level?
    • Is it something that happens continuously, or do you in principle only swap between two groups?
     
  3. lijianfeng

    lijianfeng

    Joined:
    Sep 8, 2015
    Posts:
    54
    I want to use GrounpIndex as the camp,for example, blue camp and red camp are enemy camp,they have each army and building,the building are mesh collider,I can't even set its groupindex. As we know ,the CollisionFilter can quickly filter targets I want when I use physics query to search targets ,Include building make up of MeshCollider.
     
    Last edited: Mar 17, 2020