1

I am using Kudan AR framework https://www.kudan.eu/ to develop iPhone app on Xcode 7.3.1.

I am able to reproduce the basic like how to setup model and tracker. When a marker is detected in an ARCameraViewController, an armodel successfully appears in the camera view.

My situation is: I want to call a function when a marker is detected in ARCameraViewController. The function may be print("hello") or download something.

How may we achieve this?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278

1 Answers1

1

You want to use:

- (void)addTrackingEventTarget:(id)target action:(SEL)action forEvent:(ARImageTrackableEvents)event;

e.g.

[trackable addTrackingEventTarget:self action:@selector(imageDetected:) forEvent:ARImageTrackableEventDetected];

You can find a bit more documentation about this in Kudan's API docs https://wiki.kudan.eu/apidocs/iOSDocs/db/de1/interface_a_r_image_trackable.html#ae5329511da8f0b137e2d472e52c22e95

MultiColourPixel
  • 1,222
  • 10
  • 19
Tom
  • 51
  • 2