Start a new topic

Rectangle 2D ARObect(.png) becomes trapezoid/tilted when altitude is set.

Rectangle 2D ARObect(.png) becomes trapezoid/tilted when altitude is set.


Hello Andreas Huser

Thanks for your reply.

I calculate the angle of object with distance and height by trigonometric function.

It reminds me of junior high school mathmatics.

Then I put the angle data into tilt of ARObject.

It works perfect!! 

 

This is expected behaviour... You are placing the object 10 meters above user level. Geo-Augmentations are always facing towards the user. This behavior is not customizable yet, unfortunately. You can defina a proper rotate.roll / rotate.tilt attribute to workaround this. 

 

I made ARObject with RelativeLocation.

 

    var location = new AR.RelativeLocation(null, 30,20,10); // altitude set 10

    

    overlay = new AR.ImageDrawable(new AR.ImageResource(?test_rectangle.png?,1, {offsetX: 0,offsetY: 0,scale:scale,rotation:rotation});

 

    obj = new AR.GeoObject(location,{

      drawables: {cam: }

     });

 

in this case test_rectangle.png appear as trapezoid like it tilted.

(see tiltedPic.png)

 

If I don't set alltitude

 

    var location = new AR.RelativeLocation(null, 30,10,0);//  altitude set 0

  

It shows as rectangle.

(see verticalPic.png)

 

Is it possible to set altitude and do not make png file tilted??

    

 
Login or Signup to post a comment