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

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

1. 移动控制。 [ 100%]

... 下放开注释就发生错误。       //         this.owner.transform.localRotationEulerX=this.hitResult1.collider.owner.transform.localRotationEulerX;        //         this.rotation=this.owner.transform.localRotationEuler;         //     }else if(this.hitRes...

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

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

...久才发现是laya的addChild()方法的原因。你可以打印下child.transform.position,会发现child.transform.position = child.transform.localPosition + owner.transform.position,导致child发生了位移。 以下是是我验证出来的结果,基于两种不同的思路,这最终...

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

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

....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. CameraMoveScript.as在哪儿下载群里的有错 [ 93%]

...(state.elapsedTime); } protected function mouseDown(e:Event):void { camera.transform.localRotation.getYawPitchRoll(yawPitchRoll); lastMouseX = Laya.stage.mouseX; lastMouseY = Laya.stage.mouseY; isMouseDown = true; } protected function mouseUp(e:Event):void { isMouseDown = false; } protected function...

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

5. 3D模型x方向角度不为0,时。挂刚体和碰撞器。在rotate y方向时。模型会乱转,不挂就没问题 [ 92%]

...题   模型x转了-90度   console.log(angle, " lastangel ", this.owner.transform.rotationEuler.y) this.lastAngle = this.owner.transform.rotationEuler.y; this.owner.transform.rotate(new Vector3(0, angle - this.lastAngle, 0), false, false) 打印出来看到y方向角度一直在变。   如果...

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

6. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 83%]

...er.getChildByName("girl1") as Laya.Sprite3D; //模型缩放 this.roleModel.transform.localScale = new Laya.Vector3(0.8,0.8,0.8); //获取角色动画组件 this.roleAni = this.roleModel.getComponentByType(Laya.Animator) as Laya.Animator; //动画完成事件监听 this.roleAni.on(Laya.Event.COMPLETE...

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

7. 2.0版本可用的CameraMoveScript.ts [ 82%]

...RotationZ);             this.tempRotationZ.cloneTo(this.camera.transform.localRotation);             this.camera.transform.localRotation = this.camera.transform.localRotation;         }     }          /**          * @inheritDoc          */...

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

8. 3D坐标系转换 [ 82%]

3D坐标系转换 Laya.Vector3.transformCoordinate(worldPos, this.owner.transform.localMatrix, this._tempPos); 我想将一个世界坐标转换到某个Sprite3D的本地坐标,上面这种写法,的出来的结果不对,所以问下应该怎么转换 2018-07-19 添加评论 免费帖 --> 分...

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

9. 关于3d项目中component的问题 [ 80%]

...s3D.convert3DCoordTo2DScreenCoord(translate, convertTranslate); this.owner.transform.localPosition = convertTranslate; } } }()); 2016-11-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Laya_XS 赞同来自: 你...

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

10. 物体随着鼠标滑动旋转脚本 [ 79%]

...[0], yprElem[1], yprElem[2], this.tempRotationZ);         this.Obj.transform.localRotation = this.tempRotationZ;     } } //鼠标按下Object随着鼠标滑动得出相应的坐标值 ObjectRotate.prototype.mouseDown = function (e) {     this.Obj.transform.localRotation.getYawPitchRo...

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