Start a new topic

[Android] AR.ActionRage and Camera Orientation

[Android] AR.ActionRage and Camera Orientation

I am trying to use the AR.ActionRage in order to show/hide the geoobjects in a certain range, but i am having some difficulties.
For example in the example tutorial1.html we have:
function newData(jsonData){
jsonObject = JSON.parse(jsonData);
document.getElementById("statusElement").innerHTML='Loading JSON objects';
for(var i = 0; i (...)
geoLoc = new AR.GeoLocation(jsonObject.Point.latitude,jsonObject.Point.longitude,jsonObject.Point.altitude);
jsonObject.poiObj = new AR.GeoObject(geoLoc, {drawables: {cam: poidrawables}});
Where i have to put the action range?

Another question is related with the camera orientation. When i start the application sample or even the wikitude world browser the camera shows the image 90? rotated Anti-ClockWise. What can be causing this? I have an LG P500

Best Regards

you would need to create an AR.ActionRange object. e.g. var actionRange = new AR.ActionRange(location1, 500); where location1 would be an AR.GeoLocation object and 500 is the radius in meteres around this location. Whenever the user enters or exits this area the onEnter and onExit triggers of AR.ActionRange will be called. See AR.ActionRange/ActionArea in the library reference for more details.

About the rotation issue, can you post the Android version you are running and if you are seeing this on different phones as well.

The Android  version is: 2.3.3
I haven't tested in other phones

Best Regards
Hi Filipe,

Thanks for pointing this out.
We observed this behavior under certain circumstances on a small number of devices but were able to fix this issue and will publish it in upcoming SDK / Wikitude version.

Would be great if you can tell use if the issue is fixed on your device too in upcoming SDK update begin of Mai.

Sorry for inconvenience & thanks for assistance.

Kind regards,
When the new SDK version will be release ?

I am trying AR.ActionRange but i still not getting to work... I want to show the GeoObject only when is the range that i have defined.
I have something like this:var geoLoc = new AR.GeoLocation(jsonObject.Point.latitude,jsonObject.Point.longitude,jsonObject.Point.
var actionRange = new AR.ActionRange(geoLoc, 500);
jsonObject.poiObj = new AR.GeoObject(geoLoc, {drawables: {cam: poidrawables},                         triggers:{                           
onEnterFieldOfVision: function(){                               
this.enabled = actionRange.isInArea(geoLoc);                           
            onExitFieldOfVision: function(){
                  this.enabled = actionRange.isInArea(geoLoc);                           
But all the objects are still showing despite the defined range.
What am i doing wrong?
Login or Signup to post a comment