• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 542 项符合查询结果, 库内数据总量为 31,671 项。 (搜索耗时: 0.0054 秒)

191. lh文件内meshSprite添加阴影属性无效 [ 70%]

...果成功后,使用lh文件加载多个模型,用for语句批量为meshSprite3D添加阴影属性,但仅有最后一个成功(图片绿地上阴影),for语句内材质修改却全部都生效了   var mesh:Laya.MeshSprite3D; for(var i =0;i<this.sprite3D._childs.length;i++){ mes...

来源: Laya_社区 发布时间: 20171110

192. 3D粒子特效第一次卡顿最终解决方案 [ 70%]

...ader。 private loadEffectComplete():void{         var effect:Laya.Sprite3D = Laya.loader.getRes("res/effect/2/Conventional/bullet.lh");         this.compileShader(effect);         //===========放心使用吧=================         var myeffect:Laya.Sprite3D = effe...

来源: Laya_社区 发布时间: 20190404

193. .lh 文件不能在同一js文件内重复引用吗? [ 70%]

...出了一个lh文件,打算复用。            var shelf0 = Laya.Sprite3D.load("DoorShelf/shelf.lh");            this.scene.addChild(shelf0);            shelf0.transform.translate(new Laya.Vector3(-4,1.2,35));            var shelf3 = Laya.Sprite3D.load("DoorShe...

来源: Laya_社区 发布时间: 20180301

194. 给模型动态添加脚本报错 [ 70%]

....js:13226)     at goldItemNode._onAdded (libs/laya.d3.js:10592)     at Sprite3D._addComponentInstance (libs/laya.core.js:13244)     at Sprite3D.addComponent (libs/laya.core.js:13291)     at game_scene.showPlayerGold (js/bundle.js:278)     at game_scene.onPreLoadFinish (js/bundle.js:210)  ...

来源: Laya_社区 发布时间: 20200326

195. 资源加载(TypeScript-3D基础(TS)-LayaAir3D之资源加载) [ 70%]

...l, function(tex) { //使用纹理 var earth1 = scene.addChild(new Laya.MeshSprite3D(PrimitiveMesh.createSphere(5, 32, 32))); earth1.transform.translate(new Laya.Vector3(10, 20, -8)); var earthMat = new Laya.BlinnPhongMaterial(); earthMat.albedoTexture = tex; earthMat.albedoIntensity = 1; earth1.mesh...

来源: Laya2.0_文档 发布时间: 20210715

196. 关于3d碰撞检测 [ 70%]

...了,但是检测结果一直是-1 相关代码:const field: Laya.MeshSprite3D = this.scene.getChildByName("stadium").getChildByName("field") as Laya.MeshSprite3D;//拿到地板 const sprite3d1MeshCollider: Laya.MeshCollider = field.addComponent(Laya.MeshCollider) as Laya.MeshCollider; sprite3d1...

来源: Laya_社区 发布时间: 20180316

197. 请问Laya如何使用第三方物理库 [ 69%]

... CannonRigidbody extends Laya.Script3D { static map: { [key: number]: Laya.Sprite3D } = {}; body: CANNON.Body; t: Laya.Transform3D; public onCollisionCB: (s: Laya.Sprite3D) => void; public ignoreRotate: boolean = false; ...OnAwake里面创建CANNON.Body, OnEnable里面把CANNON.Body加入到CANNO...

来源: Laya_社区 发布时间: 20200217

198. 3d对象使用addChild后localPosition没有变化 [ 68%]

...wner * @param child */ static addChildHelper(owner: Laya.Node, child: Laya.Sprite3D) { let position = child.transform.position.clone() let rotation = child.transform.rotation.clone() let scale = child.transform.getWorldLossyScale().clone() owner.addChild(child) child.transform.position = position ch...

来源: Laya_社区 发布时间: 20200819

199. 导入缩放过带有MeshCollide时出错,Cannot read property 'setLocalScaling' of undefined [ 68%]

...)     at PhysicsCollider.__proto._setActive (laya.core.js:7072)     at Sprite3D.__proto._activeHierarchy (laya.core.js:13777)     at Sprite3D.__proto._activeHierarchy (laya.core.js:13784)     at Scene3D.__proto._activeHierarchy (laya.core.js:13784)     at Scene3D.__proto._processActive (la...

来源: Laya_社区 发布时间: 20190418

200. 请教个3D资源导出问题 [ 68%]

...,在游戏中需要分别创建为带Rigidbody3D和带PhysicsColliderSprite3D, 这种情况一般要怎么处理啊。 只能在unity里分别导出为两个.lh吗(一个只有碰撞体,一个有碰撞体和刚体)。 2020-05-21 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

来源: Laya_社区 发布时间: 20200521