Search Unity

Handling collisions

Discussion in 'Entity Component System' started by bugfinders, Oct 1, 2019.

  1. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,790
    We are beginning to get more and more examples of the ever changing thing that is DOTS. Looking at the stuff thats come out of the unity conference it really does feel like DOTS is verging on adult hood and can be far more usable. However, many of the examples are incredibly simple, which is nice, but.. how many spinning things does a girl need? Anyway, one of the things that has confused me a lot so far, is things like handing collisions on the entities.. I had hopes for the session with the guy and his spread fire burst demo, but while the entities disappeared it wasnt clear how he had had them realise they were hit with bullets and died..

    Unfortunately where I work doesnt let me at the packages, I can only access them from home, and I also get anything from the asset store, so, I am stuck a little to reading during my spare moments. However, collisions is something I havent seen much about when talking with entities.. Please enlighten me.. I will be grateful.
     
  2. TRS6123

    TRS6123

    Joined:
    May 16, 2015
    Posts:
    246
    The Unity Physics package has ICollisionEventsJob and ITriggerEventsJob. For the former, make sure any colliders you're interested in are configured for raising collision events (in the Physics Shape script, open the Advanced foldout and enable "Raises Collision Events").
     
    bugfinders likes this.
  3. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,270
    You can find the source of the packages in Library/PackageCache in a project. Or download them from bintray. I keep a copy on my phone when I have a few minutes of downtime.

    He's doing a single-threaded brute force check of every bullet vs every enemy.

    Unity.Physics is the better approach. Let me know if you run into problems with it and I can suggest some alternative approaches.
     
  4. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    1,790
    Thanks I will look into that

    cant get to bintray from work either - in fact theres a lot of places even places like imgur are blocked... Its frustrating as it means I need to bring the machine home just to update packages, and even then, its not always in the mood, yet they allow me to have and use unity but then cant use half the decent helpful stuff thats part of it.. As a result the number of unity projects on my work machine is low. its also crazy slow (it has lots of monitoring software keeping tabs on everything you do)

    Thanks for the help guys though i will look into it, Im determined to give dots a good thrash but with the limited time i get either its changed, or, the info I want has been scarce... I appreciate the assistance..