[SOLVED] Model rotation issues in AR mode

I want to rotate the model using sliderbar,it works perfectly in a normal camera, but when I switch to AR camera, The model cannot be perpendicular to the marker plane, What reason causes this problem? thanks!PlayCanvas | HTML5 Game Engine

// update code called every frame
ScrollBarRotate.prototype.update = function (dt) {
    var value = this.entity.scrollbar.value;
    this.modelEntity.setEulerAngles(0, value * 360 + this.rotationOffset, 0);

You are rotating in global space but it’s rare that the marker will be aligned perfectly to the world axis in tracking. Try in local space instead (setLocalEulerAngles)

I got it!! it works fine right now. Thank you very much for your quick reply :blush: :smiley: