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

大约有 18 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0039 秒)

1. Cannon物理设置了ColliderShape的localOffset属性 并 isKinematic=true时模型会匀速移动 [ 100%]

...,   目测bug原因是 laya.cannonPhysics.js 内的_innerDerivePhysicsTransformation 方法中,错误的将 colliderShape.localOffset 的世界坐标,设置成了 transform.position 。导致物体会一直匀速移动。 _innerDerivePhysicsTransformation(physicTransformOut, force) { var tra...

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

2. 加载.lh文件 运行后黑屏 无法显示 [ 99%]

...his.scene.ambientColor = new Laya.Vector3(1, 1, 1);         camera.transform.translate(new Laya.Vector3(0,0.8,1.5));         camera.transform.rotate(new Laya.Vector3( -15, 0, 0), true, false);     //  var camera:Laya.Camera = this.scene.addChild(new Laya.Camera(0, 0.1, 100)) as...

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

3. 3D物体检测到碰撞后,被碰撞物被移除的时候过30秒再次出现?并添加到舞台 [ 99%]

....onTriggerStay = function (other) { this.tsizex = this.box._components[0]._transformOrientedBoundBox.extents.x; this.tsizez = this.box._components[0]._transformOrientedBoundBox.extents.z; this.osizex = other._transformOrientedBoundBox.extents.x; this.osizez = other._transformOrientedBoundBox.extents...

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

4. (实现手指控制模型的缩放旋转)触控可以识别 但是导入的模型没有根据触控反应 [ 97%]

...me = "camera";         //相机平移位置         camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5));         //旋转相机         camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false);                      //创建平行光 ...

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

5. Laya多点触控是有开关吗 为什么多点触控没有任何反应 [ 97%]

...me = "camera";         //相机平移位置         camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5));         //旋转相机         camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false);                      //创建平行光 ...

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

6. 判断玩家在地面还在空中 [ 95%]

...ody.colliderShape as Laya.BoxColliderShape         let y:number = this.transform.position.y-bc.sizeY/2 - 0.05         let vec3:Laya.Vector3 = new Laya.Vector3(this.transform.position.x,y,this.transform.position.z);         var ray = new Laya.Ray(vec3,new Laya.Vector3(0,0,1));        ...

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

7. 动画混合问题,Avatar动画混合报错. [ 94%]

...RO; Laya.Vector3.normalize(dir,norDir); console.log(norDir); //this.sprite.transform.translate(norDir,false); // let position = Laya.Vector3.ZERO; // Laya.Vector3.add(this.sprite.transform.position,norDir,position) // this.sprite.transform.position = position; this.sprite.transform.localPositionX +=...

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

8. 官方案例里摄像机绕物体旋转脚本的问题 [ 93%]

...上OK,移动端没试,有问题调试着改一改就OK啦。。import Transform3D = Laya.Transform3D; import Vector3 = laya.d3.math.Vector3; import Quaternion = laya.d3.math.Quaternion; /* 用法: //初始化照相机 var camera = this.newScene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Ca...

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

9. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 91%]

...节点添加onTriggerEnter的脚本监听, 当我不更改 红色小人的 transform.rotationEuler 值时,图中黑色小牛要靠近红色小人才会触发onTriggerEnter的回调,一切运行正常.   但是当我在update里 更改红色小人的 transform.rotationEuler 值后,黑色小牛并不...

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

10. [LayaAir3]关于laya更新到3.1出现射线检测不到的情况 [ 90%]

...返回的d的数据         var startPoi=new Laya.Vector3(this.Bullet.transform.position.x,this.Bullet.transform.position.y,this.Bullet.transform.position.z-0.5);//起始点         var dir = new Laya.Vector3(0,0,-1);//方向         var ray:Laya.Ray = new Laya.Ray(startPoi,dir);//创建...

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