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

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

151. 修改position与修改localPosition结果不一致(同处于3d场景下的两个节点) [ 80%]

...Sprite3D(Laya.PrimitiveMesh.createBox(1, 1, 1))) as Laya.MeshSprite3D; box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); var material: Laya.BlinnPhongMaterial = new Laya.BlinnPhongMaterial(); Laya.Texture2D.load("res/layabox.png", Laya.Handler.create(null, function (tex: Laya.Texture2D...

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

152. 为什么动态设置聚光灯朝向无效呢 [ 80%]

...ar tar = new Laya.Vector3(); var dir = new Laya.Vector3(); var src = model.transform.position; spotLight.transform.position = camera.transform.position; Laya.Vector3.subtract(src, camera.transform.position,tar); Laya.Vector3.normalize(tar, dir); spotLight.direction = dir; 目的是让聚光灯,始...

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

153. 为什么我获取不到鼠标滚轮的delta值,我查看laya.events.Event 里面没有这个属性 [ 80%]

...amera = this.scene.addChild(new Laya.Camera()) as Laya.Camera; this.camera.transform.position = new Laya.Vector3(0, 0, 5); this.camera.transform.rotate(new Laya.Vector3(0, 0, 0), true, false); Laya.stage.on(Event.MOUSE_WHEEL,this,this.onMouseWheel); } private onMouseWheel(e:Event):void { e. //没有...

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

154. 要让2DUI跟随3D物件,比如说敌人头上有血条。请问要怎么做? [ 80%]

...同来自: let out = window.app.fcUtil.worldToViewportPoint(this.owner.transform.position, window.GameMag.Camera1); this.hpNode.x = out.x - this.hpNode.width / 2 this.hpNode.y = out.y + this.hpNode.height *3.5 //this.owner.transform 3d的物体 //this.hpNode 2d的ui   //3d坐标转2d...

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

155. Laya3D,支持的IOS版本最低是多少? [ 79%]

... camera:Camera = scene.addChild(new Camera(0, 0.1, 100)) as Camera; camera.transform.translate(new Vector3(0, 0.5, 1)); camera.transform.rotate(new Vector3( -15, 0, 0), true, false); var mc:Sprite3D = scene.addChild(Sprite3D.load("res/mod5_13.lh")) as Sprite3D; c416288806 • 2018-03-05 11...

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

156. 3D的camera是否有像three.js一样的lookAt ? [ 79%]

...内容相关的链接 提交 1 个回复 183*****755 赞同来自: camera.transform.lookAt(target, up, isLocal) 2017-08-30 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 dinghn 相关问题 请问有没有方法能够获取“鼠标是...

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

157. StaticModel_MeshSample例子运行不起来 [ 79%]

...ddChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera;         camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5));         camera.transform.rotate(new Laya.Vector3(-30, 0, 0), true, false);         var mesh = scene.addChild(new Laya.MeshSprite3D(Laya.Mesh.load("../../res/thre...

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

158. [BUG]刚体约束问题,移动后约束混乱! [ 79%]

...addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Camera;     camera.transform.translate(new Laya.Vector3(0, 3, 30));          //方向光     const directionLight =this.newScene.addChild(new Laya.DirectionLight()) as Laya.DirectionLight;     directionLight.color = ne...

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

159. 想做天空盒但是camera上没有sky这个属性 [ 79%]

...cene3D; camera = scene.addChild(new Camera(0, 0.1, 100)) as Camera; camera.transform.rotate(new Vector3(10, 0, 0), true, false); camera.addComponent(CameraMoveScript); camera.clearFlag = BaseCamera.CLEARFLAG_SKY; //天空盒 BaseMaterial.load("res/threeDimen/skyBox/skyBox1/skyBox.lmat", Handler.crea...

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

160. 摄像机lookAt如何围绕一个模型做Tween动画? [ 79%]

... var y = 1; Laya.timer.frameLoop(30, this, function () { y = y + 1; camera.transform.lookAt(model.transform.position, new Laya.Vector3(0, 1, 0), false); camera.transform.rotate(new Laya.Vector3(0, y, 3), false, false); }); 我想让摄像机围绕一个模型旋转做动画,用Tween没有起到作...

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