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. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

how to do collision/trigger exit job?

Discussion in 'DOTS Physics' 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

    Unity Technologies

    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.