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

Question Possible to Make Point Effector 2D / Area Effector 2D to Ignore based on Condition

Discussion in 'Physics' started by Reimirno7, Jun 8, 2023.

  1. Reimirno7


    Nov 25, 2021
    I know you would use collider mask but in my current setup there are stuff that are on the same collision layer but I only want to make point effector affect some of them (determined at runtime).

    For example enemy's point effectors should not affect itself but should affect other enemies. All of them are from the same prefab and thus in the same layer. There are many of them you can't give every single one a uniuqe collision layer either.

    If this is not possible, any pointers as to how to achieve a point effector 2d with this runtime custom ignore?