Start a new topic

Calculating offsetX , OffsetY and Scale

Calculating offsetX , OffsetY and Scale


Hi,

I know that drawables on target added using three values offsetX , OffsetY and Scale , 



 


var imageDrawable = new AR.ImageDrawable(imageResource, 5, {
  offsetX : 1,
offsetY : 1,
  rotation : 190,
  onClick : function() {
      // 'this' represents the ImageDrawable
      this.rotation += 10;
    }
});


Let's say that I want to dynamically add image on target from my own web Interface which has ordinary positive x and y positions percentanges relative to target ,and image has ordinary width and height.

How I can calculate the corrosponding wikitude offestX & offsetY and Scale of this image ?!

No evryone help me, please!

Hello Ethan,

My colleague Nicola has already replied to you through email so I will quote here her answer

"The best way to start is to check out the sample app which comes with the SDK download package together with the respective documentation section.

Details on the positioning, SDUs can be found here"
Login or Signup to post a comment