Start a new topic

onClick not working

First of all, let me say that I have went through all the relevant examples in wikitude samples, including 3Dmodelatgeolocation, solarsystem and all. But the onclick event in my code is not working. The coin animation is running successfully. and the onLoaded is triggered.

I have attached the script.

I tried attaching the onClick to geoobject as well as model, but it doesnt seem to work. 

(25.1 KB)

Hello Ashif,

Since the onCLick event is working in our sample, I am sure you can understand that we cannot go through your code and see what you are maybe doing wrong. However, please refer here and see how the onCLick function is defined and then do exactly the same within your app as well. Could it be that you are confusing the onClick function with the onLoaded function?



Yeah the documentation you have provided does say how to create a model. But however, It is presented in such as way as to make the model work. It is presented as a standalone functionality. It doesn't pretty much handle the scenario when there are multiple ARobjects on screen, multiple image drawables, 3D models and all, fed into the marker file from a server side script, properly through another gateway JS file, in which, the "World" is actually declared. It is true that 3D models can be clicked and played around in your sample, but in real world, it doesn't work like that. I have been developing your app on your platform for around an year now and I really want to buy the license, but atleast either provide support to handle real-life Gamified AR usecases instead of always pointing to a documentation that is implemented way, way away from an actual usecase.

Please understand. I have tried every way. I have raped the entire relevant samples. Just creating a code that work on a sample app doesn't matter. I need the app to work in a real life, real world scenario. 

And Also, yesterday I ran into an issue of animations not working properly when there are multiple 3D models on screen. When it is a single animation, it works pretty, well. But as I am creating an AR game, this requires multiple animated models to be loaded into the view at once and the animations just don't work that way. 

FYI, I am using a reloadingcontent.js file as a gateway(where I have declared the "world") and marker.js file that creates the markers. The reloadingcontent.js file is the one that communicates with the server.

I have gone through the entire documentation. Please don't direct me to one again. Please review my code. 

Hello Ashif,

I am pretty sure you will understand that it is not possible for us to review the code from every user that is having issues with his app, as this would be impossible (both in terms of time and resources needed). If what you are experiencing is indeed a Wikitude bug then please, send us your AR experience where we can actually test it easily and reproduce your issue. Just make sure that the project that you will send will run. Also describe the steps you take so that we can reproduce your issue.



I have replied to the query via email and I have sent the password for the archive in that mail(security reasons)  and I have attached the zip which contains the index.html and the entire AR experience. The locations will be fed from the server, but I have set up a randomized relativelocation for each time a marker is created, so the experience can be recreated in your office. The problems noted were are as of follows.

1. The onClick trigger associated with each model is not working.

2. The coin animation is not working. (which is defined inside the onLoaded of the model)

3. In my real usecase, all my 3D objects has unique IDs associated with them so that it's onfieldView can be tracked in the server via an AJAX , everytime the model is loaded on the screen. The behavious is unpredictable when their are multiple models with multiple IDs on the screen. (I thought this has to do with the "this" keywork)

Thanks and regards

(1.2 MB)

Hello. In case you have forgotten, nothing yet?

Here is the AR experience. Password is sent via email to the support.

(1.25 MB)

Hello? Anything yet?

Hello Ashif,

Once again, I tried to test the world you sent me but when I put your app on our server nothing happened and nothing loaded. Could you please send me an AR app that I can easily test?




I don't know what's wrong at your side, but this seems to be working quite well for me, except the onClick and the modelAnimation. 

I have eliminated all the non-essential codes and has attached an optimized AR experience that I am currently running in my phone now. GIve it a few seconds for the 3D model of coin to load. I am using relative location and you should see the coin within a few seconds. The onClick as well as modelAnimation is not working, Please check. I have sent passwrod by email to you. I am so close to a beta release and this is the single thing is preventing me from getting this project past the beta phase. 

The directory structure of the following attachment is ../experince/core/index.html

Thanks in advance. 

(1.24 MB)

Anything here yet?

Hello? Anything up with the samples that I sent lately?

Login or Signup to post a comment