Start a new topic
Solved

AR.Label with ObjectTrackable

Hi Team : 

I would like to display many labels around the target object on object recognition so I`m using


this.objectTrackable = new AR.ObjectTrackable(this.tracker, "*", 

{ drawables: { cam: World.drawables }, 

 onObjectRecognized: this.objectRecognized,

 onObjectLost: this.objectLost, 

 onError: function(errorMessage) { alert(errorMessage); },

 enableExtendedTracking: true, 

 extendedTarget: "*"

}); },


objectRecognized: function objectRecognizedFn() { 

    World.createLabels(); 

},


createLabels: function createLabelsFn(){

var titleLabel = new AR.Label("title", 1, { zOrder: 1, translate: { y: 0.55 }, style: { textColor: '#FFFFFF', fontStyle: AR.CONST.FONT_STYLE.BOLD } }); 


 var descriptionLabel = new AR.Label("description", 0.8, { zOrder: 1, translate: { y: -0.55 }, style: { textColor: '#FFFFFF' } });


World.allCurrentModels = []; World.allCurrentModels = World.allCurrentModels.concat([titleLabel, descriptionLabel]);


World.objectTrackable.drawables.addCamDrawable(World.allCurrentModels);

},


The AR.Labels show successfully but it`s out of shape like attachment


Do you have any suggestion of this?

Thanks.



How can I set the AR.Lable parallel to the target object and how can I remove the mirrored effect? 

Thanks.

533656.jpg
(123 KB)

Hi,


Please provide the complete AR experience (html, js, css files, assets, wto files,...) and all the images that you used for the creation of the Object TargetCollection.


Thx and greetings

Nicola

Login or Signup to post a comment