Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[Help] Collision resolution without Physics2D

Discussion in 'Project Tiny' started by dogonwheels, Jan 10, 2019.

  1. dogonwheels


    Jan 10, 2019
    I'm trying to add collision detection and resolution so my user controlled entity doesn't go through impassable objects. Naively I thought this would be done best by resolving collisions and moving the player back out of the object - or is this best done with ray casting/checking before moving the object?

    I realise that Physics2D likely handles all this - but I don't want physics/forces based movement for my player character and enemies.

    I noticed that the docs mention hit test results - - but I don't see which system would add these.

    Alternatively, how would I go about ray casting in Tiny? It feels like looping through all the world's objects in the movement code and manually checking would be against the spirit of ECS - happy to be wrong though! :D

    (I'm still pretty new to Unity, let alone Tiny, so forgive me if I've missed the obvious)

  2. sebastianm_unity


    Unity Technologies

    May 3, 2018