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

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…!!!

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

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 ?

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:

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:

void OnTriggerEnter(Collider other)
    {
        Debug.Log("Ouch!");
    }

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?

I have the same question here.

How do you know which are both colliders on each side of the collision ?

In the Collider parameter of the function you only have the information for one (the collider collided by the Rigidbody).
In a OnCollisionEnter() you can workout the answer through the ContactPoint[ ] provided in the Collision class given in parameter of the function.

I could get all collider within my original object and compare bouding boxes but there might be another way ?

Thanks for the insight.