[LayaNative 2.0]角色碰撞器添加复合型碰撞形状,报错Qt[a[((a[(t >> 2)] + 8) >> 2)]] is not a function
<<<<<<<<报错:
//飞机
let plane = scene.getChildByName("plane") as Laya.MeshSprite3D;
let character: Laya.CharacterController = plane.addComponent(Laya.CharacterController);
let collider_shape_box = new Laya.BoxColliderShape(2.5, 0.8, 0.8);
collider_shape_box.localOffset.x = -0.5;
let collider_shape:Laya.CompoundColliderShape = new Laya.CompoundColliderShape();
collider_shape.addChildShape(collider_shape_box);
character.colliderShape = collider_shape;
<<<<<<<不报错:
//飞机
let plane = scene.getChildByName("plane") as Laya.MeshSprite3D;
let character: Laya.CharacterController = plane.addComponent(Laya.CharacterController);
let collider_shape_box = new Laya.BoxColliderShape(2.5, 0.8, 0.8);
collider_shape_box.localOffset.x = -0.5;
character.colliderShape = collider_shape_box;//这里改成直接添加盒型就不报错
直接添加盒型碰撞形状正常
换成添加复合型就会报错
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
181*****826
赞同来自: