Start a new topic

3D object (Geolocation)

Hello, 


I used the 3d model for geolocation which is good, (Using Android javascript)


But I want to create something like ARkit cube.

Which I can put my object with a fixed LatLng location. and I can go towards it and it begins to get bigger and get away and then its get smaller, and rotate around it.


the 3d model have RelativeLocation and this makes the object tracking my location, and the Geolocation but also can't do what I want ( and sometimes the object position has a sudden change in the location) the ARkit makes it stable.


can I achieve this? any tutorials?


((I read most of the forum topics didn't find what I need)


Hello Ahmed,


When working with Geo locations you can choose either RelativeLocation (and this is what we implement in our samples) or GeoLocation. The concept of RelativeLocation is that they are always relative to the current user location and this is why we prefer these when we need to test. GeoLocations are fixed to a certain latitude/longitude coordinate and stay at exact this place. If I understood correctly your use case then, I would work with GeoLocation.

I hope this helps
Eva


1 person likes this

That's right, But when I use geolocation a sudden change for the object location happens, I think because the accuracy of my location when it changes my location suddenly the view changes too so the object place change in the screen, right ? 

Hi Ahmed,


I am afraid I do not exactly understand what your issue with GeoLocation is. Could you please try and explain again or even better, send us a video demonstrating your issue?


Thanks

Eva

Hi Ahmed ,


Have you found any solution for this ?

I'm facing exactly the same issue . 


@Eva 

 

var World = {
  loaded: false,
  init: function initFn() {
    AR.context.onLocationChanged = function (latitude, longitude, altitude, accuracy) {
      World.myLocation = {"latitude": latitude, "longitude": longitude, "altitude": altitude};
      if (!World.created) {
        World.created = true;
        World.createModelAtLocation(World.myLocation);
      }
    };
  },
  createModelAtLocation: function createModelAtLocationFn(location) {
    var Geolocation = new AR.GeoLocation(location.latitude, location.longitude);
    var modelEarth = new AR.Model("assets/earth.wt3", {
      onLoaded: this.worldLoaded,
      scale: {
        x: 1,
        y: 1,
        z: 1
      }
    });
    var indicatorImage = new AR.ImageResource("assets/indi.png");
    var indicatorDrawable = new AR.ImageDrawable(indicatorImage, 0.1, {
      verticalAnchor: AR.CONST.VERTICAL_ANCHOR.TOP
    });
    var obj = new AR.GeoObject(Geolocation, {
      drawables: {
        cam: [modelEarth],
        indicator: [indicatorDrawable]
      }
    });
  },
  worldLoaded: function worldLoadedFn() {
    World.loaded = true;
    console.log("World Loaded")
  }
};
World.init();

 

Note:

Even i tried adding Altitude in GeoLocation. 


Thanks

Habib

Helo Habib,


Could you please provide more details regarding your issue? Is the 3D model unstable?


In addition, could you also tell me which version of the SDK you are using and if you are using the JS API or any of our extensions?


Thanks

Eva

Hi Eva,


Yes,

  1. 3D Model unstable.
  2. Once Model loaded, Model keep on following me everywhere. Model is not fixed in Geo location.


Cordova Wikitude SDK - 7.2.1

Ionic - 3.20.0

cordova-ios - 4.5.4


Additional plugins:

  • cordova-plugin-camera
  • cordova-plugin-geolocation
  • cordova-plugin-file


Thanks

Habib

Dear Eva,


Is there any solution from you ?

Its been 4 days, and above mentioned issues is not rectified about 2 years.

Please give me a solution for this issue . 


Waiting for your reply ( EVA / Anyone from Wikitude? ) 


Thanks

Habib 


Login or Signup to post a comment