Start a new topic

Render 3d model between 2 geolocation points

Render 3d model between 2 geolocation points


Hey

I want to render a 3d pipe model between 2 geolocation points i.e  i should be able to give the 2nd location till which the pipe should be displayed .

var init = function(){

       alert("model loaded ");

    

 

var pipe = new AR.Model("assets/pipe_final.wt3", { scale: {x:1, y:1, z:1} } );

var loc = new AR.GeoLocation(19.15,72.99);

alert("model loading ");

var geoObj = new AR.GeoObject( loc, {

                       drawables: {

                            cam: pipe

                       }

                   

                 });

};

 

init();

 

With the help of above code i am able to render the model at the given location but i also want to give the destination location till which the pipe will be shown.

Is it possible to render 3d model between 2 geolocation points ? If yes then it would be great if you can provide the necessary code.

Hi there!

Unfortunately is is not possible to define a  heading of a GeoObject, it is always facing towards the user.
But: To e.g. guide the user from a to B you can define simple 3D Objects like circles/balls and position them between the two locations.

Best regards,
Andreas

Hey

Thank you for your rply but can u please tell me how to do that i mean the code it would be great help.

 

Please have a look at the documentation of an AR.GeoObject. Besides ImageDrawables you can also define 3D Models as camDrawables. Instead of pctures you then see the defined 3D Model.
Note that those always face towards the user.

Best regards,
Andreas

PS.: Have a look at the SDK-Sample app's wt3 files or create your own 3DModel using the Wikitude 3D Encoder (Tools section on download page).

Hii

As Suggested by you i had a look at AR.GeoObject and by using the location set in that i.e   i m trying to render a pipe between 2 locations this way :

var geoLocation1 = new AR.GeoLocation(19.15, 72.73);

var geoLocation2 = new AR.GeoLocation(19.22, 73.75);

 

// a GeoObject which has two locations set

var geoObject3 = new AR.GeoObject( , drawables : { cam : pipe} 

 

but i am getting 2 pipes starting from above 2 locations given but i want to render model between this points 

please suugest.

Hi there!

As statet in a previous post there is no support for "Lines between GeoLocations" but you can use your approach to e.g. display 3D balls that a re rendered between the two GeoLocations to intimate a path between them.

Best regards

Hii

Thank You for your answer that i cannot render a pipe between 2 points but i want to know how can i render a 3d ball between 2 points i m not able to do using var geoObject3 = new AR.GeoObject( , drawables : { cam : pipe}  is this the right way to do or i have to use some other code.

The concept is very much the same but instead of defining pipes at position A and B you define a path (list of AR.GeoLocations) and create AR.Models as AR.GeoObjects of a ball instead.

Best regards
Login or Signup to post a comment