Start a new topic

Need to add cross hairs sign on the camera overlay.

Need to add cross hairs sign on the camera overlay.


Hi there!

This is not directly possible, but you can simulate this behaviour by only displaying the target when the user clicks on it. This doesn't have to be done manually. 

E.g. you can simulate a click on the screen with this small snippet:

World.clickScreenCenter = function clickScreenCenterFn() {

 

var centerX = (($(window).width()) / 2);

var centerY = (($(window).height()) / 2);

var event = {

changedTouches:

};

event.preventDefault = function() { / Intentionally Left Blank / };

 

if (AR && AR.js && AR.js.click && AR.js.click.executePlatformClick) {

AR.js.click.executePlatformClick(event);

}

 

// for auto-clicks

// setTimeout(World.clickScreenCenter, 400);

}

 

Hope that helps,

Markus

I need to add a cross hairs sign like attached on the surface of the camera overlay in Titanium for both android and ios platform, and recognize the image only when i focuse the cross hairs sign on the image.

First thing is that is it possible with titanium sdk ?.

I have search a lot for this but not get success. Please help.

Thanks an advance   
Login or Signup to post a comment