Search Unity

how to do collision/trigger exit job?

Discussion in 'Physics for ECS' started by Conspiracy, Jan 15, 2020.

  1. Conspiracy

    Conspiracy

    Joined:
    Oct 22, 2016
    Posts:
    40
    so I the current way I know to do collision or trigger is with a trigger/collision events job but as far as I know that basically just trigger/collision stay. Is there a way to do collision/trigger exit or even enter?

    code examples would be appreciated. Thank you
     
  2. Adam-Mechtley

    Adam-Mechtley

    Administrator

    Joined:
    Feb 5, 2007
    Posts:
    290
    There is not yet a "built-in" mechanism as such, in part because it introduces state information, and also because the details depend on how you want to organize your data, whether you want to change archetypes, and so on.

    One possibility is shown in the trigger event sample where you basically track the frame number:
     
    Conspiracy likes this.