Log in or register to post comments

Using AR Camera as Trigger in Unity

August 28, 2017 - 5:23am #1

Hi,

 

I am having trouble using the AR Camera asset import from Vuforia to unity to trigger events when the device camera is moved within close proximity on Unity Game Objects. I wish to use simple colliders (avoiding Ray Casting, etc) but have had not luck. I have tried all combinations of attaching colliders to game object and/or AR camera, rigidbody body objects to each one/both, etc, etc. but still with no luck.

Unity project is here if you have a few spare minutes (trying to trigger events when AR camera moves near the sphere- nothing fancy!).

(Scripting working fine in Unity but not registering debuglog on the console when the colliders are supposed to be triggered).



Any help will be greatly appreciated,

tim.

Using AR Camera as Trigger in Unity

August 30, 2021 - 5:46am #3

Hey there,

 

I'd say you don't even need to use colliders but rather query the distance between two objects, in this case the target and camera. If the distance is within your desired range you fire an event/method.

Maybe that helps a little.

 

Kind regards,

Patrick Scheper

Technical Community Manager

Using AR Camera as Trigger in Unity

August 29, 2021 - 4:08pm #2

Hi Tim,



I am having the same issue and I know that this thread was from a while back but was just wondering if you'd found a solution to this?

 

Thanks in advance.

 

Michael

Log in or register to post comments