Start a new topic

Selecting a POI pointing with a crosshair

Selecting a POI pointing with a crosshair

var clickScreenCenter = function clickScreenCenterFn() {
var centerX = ((window.innerWidth) / 2);
var centerY = ((window.innerHeight) / 2);
var event = {
event.preventDefault = function() { /* Intentionally Left Blank */ };

if (AR && AR.js && && {;

setTimeout(clickScreenCenter, 1000);




Best regards

1 person likes this

Found the fix on this discussion :

A correct syntax to have it work on Android as well would be 

        var event = {




                    screenX: X,

                    screenY: Y,

                    clientX: X,

                    clientY: Y




1 person likes this

Hi Gabriel,

thx for sharing your solution! Hopefully it helps others.

Best regards,

Andreas Schacherbauer


I am using wikitude 4.1 version. I am trying to implement the same scenario as asked in the first post.

I am not sure where to place this piece of code. In my scenario when camera ceter point focus on an image i should be able to 

display certain details.

var event = {changedTouches: };;

 where am i suppose to put this code. Can you please guide me with this solution.




Thanks for the idea and I have one question here and hope someone can help.

1. How can we get the X and Y coordinate of the Animating AR object in the screen ?


Thanks a lot and hope ot hear from someone soon.

A function to get screen coordinates is currently not available in our API. However I'm interested in why you would benefit from this feature so we can better decide if we want to support it in the future. Additionally knowing the goal you are trying to achieve we might be able to find a way to accomplish the same thing, without getting the x,y screen coordinates.

Hi Wolfgang,


Can we know what function can we use to call the "fake a click" so that we can have the selecting the point with a crosshair.


Hope to hear from you asap. Thanks.



Wei Jian


any change to this of course won't have any impact on an already released application.

At the moment I don't have anything new to share with you on that topic, but I can assure you that there currently isn't any planned change that will be conflicting with the unsupported method.

Hi Andreas,

Is this workaround still working with SDK 8.5 ? 

I can't figure out how to have it work on my side, especially the 

var event = {changedTouches: };

which doesn't look like a correct JSON object.

If this is not available anymore, is there a way to simulate a click at a specific location on the screen? I'd like to place an AR.Model in my InstantTracker World at the position corresponding to the lower-left corner of my screen, when triggering a specific javascript function.



I would like to do the same stuff. Are there news about this topic?

This feature is still in ongoing discussion on our end and no final decision has been made. However you can have a look at the code and description I've posted as 1st reply to the initial question. This might already give you the possibility you are looking for.

I confirm you that your solution works like a charm but i'm worried about future compatibility.

I will release an important app (buying a pro license i guess) with your implementation but i would like to be comforted about a real implementation of crosshair-mechanism in the near future.

Let me know




I have tried the below code in my ArchetrectWindow.js file, it seems to give error. i am using the wikitude sdk3.3.1 and titanium SDK 3.4.0.

I need to add a sign like cross hairs on the camera overlay to detact the image in 3D image recognization.

Please help

Thanx in Advance.

var event = {changedTouches: };;


Hi Mahendra,

What Wolfgang wrote above is still true, the crosshair-feature is not officially supported in the SDK, but the code should work. Basically, you are passing the screen coordinates that have been clicked to the SDK.

To help you out, we need a proper description of what is going wrong with the code in your application.


Login or Signup to post a comment