[0]如何操作人物模型的某个节点?
人物模型加载进来之后,我想传入坐标,来达到人的脚跟着坐标动起来,但是测试代码如下,设置坐标,模型的脚的坐标没有变化
Laya.Scene3D.load("res/girl/layaScene.ls",Laya.Handler.create(this,function(scene){
Laya.stage.addChild(scene);
this.Girl = scene.getChildByName("girl-ceshi") as Laya.SkinnedMeshSprite3D ;
let bip: Laya.SkinnedMeshSprite3D = this.Girl.getChildByName("Bip001") as Laya.SkinnedMeshSprite3D;
let Pelvis:Laya.Sprite3D = bip.getChildByName("Bip001 Pelvis") as Laya.Sprite3D;
let Spine:Laya.SkinnedMeshSprite3D = Pelvis.getChildByName("Bip001 Spine") as Laya.SkinnedMeshSprite3D;
let LThigh:Laya.SkinnedMeshSprite3D = Spine.getChildByName("Bip001 L Thigh") as Laya.SkinnedMeshSprite3D;
let LCalf:Laya.SkinnedMeshSprite3D = LThigh.getChildByName("Bip001 L Calf") as Laya.SkinnedMeshSprite3D;
let LFoot:Laya.SkinnedMeshSprite3D = LCalf.getChildByName("Bip001 L Foot") as Laya.SkinnedMeshSprite3D;
let p:Laya.Vector3 = LCalf.transform.position;
LCalf.transform.position = new Laya.Vector3(p.x+0.1,p.y+0.1,p.z);//为啥设置坐标没有任何效果
}
Laya.Scene3D.load("res/girl/layaScene.ls",Laya.Handler.create(this,function(scene){
Laya.stage.addChild(scene);
this.Girl = scene.getChildByName("girl-ceshi") as Laya.SkinnedMeshSprite3D ;
let bip: Laya.SkinnedMeshSprite3D = this.Girl.getChildByName("Bip001") as Laya.SkinnedMeshSprite3D;
let Pelvis:Laya.Sprite3D = bip.getChildByName("Bip001 Pelvis") as Laya.Sprite3D;
let Spine:Laya.SkinnedMeshSprite3D = Pelvis.getChildByName("Bip001 Spine") as Laya.SkinnedMeshSprite3D;
let LThigh:Laya.SkinnedMeshSprite3D = Spine.getChildByName("Bip001 L Thigh") as Laya.SkinnedMeshSprite3D;
let LCalf:Laya.SkinnedMeshSprite3D = LThigh.getChildByName("Bip001 L Calf") as Laya.SkinnedMeshSprite3D;
let LFoot:Laya.SkinnedMeshSprite3D = LCalf.getChildByName("Bip001 L Foot") as Laya.SkinnedMeshSprite3D;
let p:Laya.Vector3 = LCalf.transform.position;
LCalf.transform.position = new Laya.Vector3(p.x+0.1,p.y+0.1,p.z);//为啥设置坐标没有任何效果
}
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
小小泽
赞同来自: