Search Unity

  1. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  2. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  3. If you couldn't join the live stream, take a peek at what you missed.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

How to solve each two collider game object "OntriggerEnter" Collider problem ?

Discussion in 'ARCore' started by syedimran199696, Apr 6, 2018.

  1. syedimran199696

    syedimran199696

    Joined:
    Apr 4, 2018
    Posts:
    11
    Hello,

    I creating AR Runner Game app using AR Core. Its worked properly, but user's can't able to access (camera to cube) game object collider OnTriggerEnter() funtion won't working properly ? So, now I want to know "How to solve each two collider game object "OntriggerEnter" Collider problem ?" that's my queries. I want to trigger AR Camera to another box collider function. I would like to create similar AR Runner Game. I hope for best solution for my query.

    I attached on below sample of the requirement screenshot like "AR Runner Game".

    youtube link :


    Thanks for Advance...........!!!!!

    Screenshot (24).png
     
  2. timmunity

    timmunity

    Unity Technologies

    Joined:
    Apr 21, 2017
    Posts:
    57
    Sorry, I don't understand your question -- is it that you want to know when the GameObject with the camera enters a trigger volume? Your camera's GameObject will at least need a Collider on it.

    There's a good tutorial on the subject of triggers in general here: https://unity3d.com/learn/tutorials/topics/physics/colliders-triggers
     
  3. syedimran199696

    syedimran199696

    Joined:
    Apr 4, 2018
    Posts:
    11
    I just worked out same like what you say that. but, it doesn't working. colliders are couldn't able to trigger. I'm using UNITY 2017.3.0 P2 version. How can i develop this game ?
     
  4. CamargoF

    CamargoF

    Joined:
    Apr 6, 2018
    Posts:
    1
    Dear Sir,
    I having the same problem.
    I installed the unity 2018 + Visual Studio Community 2017 (VSC2017) for my training class of Unity.

    When I type OnTriggerEnter on VSC2017, it creates:
    Code (CSharp):
    1. private void OnTriggerEnter(Collider other) {  }
    Why private? It indicates that something is not quite correct, doesn't it?

    My "game" has two 3D objects.
    Only one object has RigidBody with "Is Kinematic" on.
    I add on both object scripts:
    Code (CSharp):
    1.     {
    2.         Debug.Log("Ouch!");
    3.     }
    And nothing had been displayed on console. It looks like the event is never generated.

    I saw all tutorials you recommended above and I was not able to fix it. Do you have any recommendation?