Start a new topic

Add Content in Button action

Add Content in Button action


I need to show button in marker scan as a content of this marker, then in its onClick event I can show/hide another content like Image/Video/3D Model

How can I do that ?

Thank you,

For the button you could use a AR.ImageDrawable as an augmentation. Then in its onClick method you need to enable the other augmentation (like 3D model). A similar approach can be found in the sample "3D Model > Interactivity". But instead of the method toggleAnimateModel you should enable the drawable.

Yes I tried this sample, but I coudn't make AR.ImageDrawable be shown except by 

drawables: { cam:{ } }, How can do that in onClick ?

Use the property enabled of the ImageDrawable and set it to false, when creating it. In the onClick event, set it true.

 

Thank you, it's working
Login or Signup to post a comment