[]图片不能按轴心旋转

   Laya.init(750,1334); 
Laya.stage.bgColor = '#000000';
Laya.stage.scaleMode = 'fixedauto'
Laya.stage.screenMode = 'vertical'


let bg = new Laya.Sprite();
bg.loadImage("../res/image/interface/intro_bg.png",375,667,1500,1500);
bg.pivot(750,750)
bg.alpha = 1
bg.rotation = 10
图片是正方形的 如上设置过pivot之后 并没有按
正方形中心点旋转
已邀请:

智力猫

赞同来自: layabox

解决了 在图片外面放了一个box
        let bgWrapper = new Laya.Box()
bgWrapper.zOrder = 0
let bg = new Laya.Sprite();
bgWrapper.addChild(bg)
Laya.stage.addChild(bgWrapper)
bgWrapper.x = 375
bgWrapper.y = 667
bg.loadImage("../res/image/interface/intro_bg.png",0,0,1500,1500);
bg.pivot(750,750)
bg.alpha = 1
bg.rotation = 20

Laya_XSN

赞同来自: layabox

    Laya.init(750,1334); 
Laya.stage.bgColor = '#000000';
Laya.stage.scaleMode = 'fixedauto'
Laya.stage.screenMode = 'vertical'

let bg = new Laya.Sprite();
bg.loadImage("../res/image/interface/intro_bg.png",0,0,0,0,Handler.create(this,aa));
function aa(texture){
bg.pivot(texture.width,texture.height);
bg.alpha = 1;
bg.rotation = 10;
}

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作