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

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

31. 怎么获取对象的坐标 [ 88%]

...r3 {elements: Float32Array[3]}   改成這樣:    console.log( camera.transform.position.x ); console.log( camera.transform.position.y ); console.log( camera.transform.position.z );   另外;你的 position 打錯,不是 postion 是 position。   2017-08-08 2 0 分享 微博 QZONE 微...

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

32. 射线检测-碰撞器混合 [ 87%]

...is.camera = this.scene.addChild(new Laya.Camera(0, 0.1, 100)); this.camera.transform.translate(new Laya.Vector3(0, 6, 13)); this.camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); this.camera.addComponent(CameraMoveScript); //加载猴子 this.layaMonkey = this.scene.addChild(Laya.Sp...

来源: Laya_示例 发布时间: 20240930

33. 高级应用-实时阴影 [ 87%]

...cene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 100)); camera.transform.translate(new Laya.Vector3(0, 0.7, 1.2)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); var directionLight = scene.addChild(new Laya.DirectionLight()); directionLight.direction = new Laya.Vector...

来源: Laya_示例 发布时间: 20240930

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

...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

35. rigidBody.applyForce 物体不会移动 [ 86%]

...ildByName( "Monster1" ) as Laya.Sprite3D; scene.addChild(Monster); Monster.transform.translate( new Laya.Vector3(monster_position_x, 0, monster_position_z) ); this.monster_character = Monster; // this.master_turn(); //添加自定义模型 var box: Laya.MeshSprite3D = this.scene.addChild( new Laya.M...

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

36. 没有人尝试使用3d物理引擎么 [ 86%]

... camera:Camera=(scene.addChild(new Camera(0, 0.1, 100))) as Camera; camera.transform.translate(new Vector3(0, 3, 6)); camera.transform.rotate(new Vector3(-15, 0, 0), true, false); camera.clearColor=null; camera.addComponent(CameraMoveScript); CameraStat.show(camera, 200, 0); //添加方向光 var di...

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

37. 使用3D摄像机 · LayaAir3.0文档 · LAYABOX [ 85%]

... { this.camera = this.owner as Laya.Camera; if (this.target) { this.target.transform.position.cloneTo(this.curpos); this.delatpos = new Laya.Vector3(); } } /** * 每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 * 此方法为虚方法,使用时重写覆...

来源: Laya3.0_文档 发布时间: 20231214

38. 正交摄像机裁剪问题 [ 85%]

...响。 var camera = (scene.addChild(new Laya.Camera(0, 0.1, 550))); camera.transform.translate(new Laya.Vector3(250, 1, 0)); var rotation = new Laya.Quaternion; Laya.Quaternion.lookAt(camera.position, new Laya.Vector3(0, 0, 0), camera.up, rotation); camera.transform.rotation = rotation; camera.clear...

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

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

...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

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

...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