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

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

1. viewportPointToRay产生的射线始终有偏差,是为什么? [ 100%]

...为什么? 我使用这种方式构造了一个射线: let point = new Vector2(Laya.stage.mouseX, Laya.stage.mouseY); camera.viewportPointToRay(point, this._ray);然后发现ray构造出来的位置始终不对,我沿着ray的方向放了一组3D物体,和从屏幕点击下去的位置始终...

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

2. 请问2.0射线到底如何使用呢? [ 87%]

...类,但下面这么用一直没有东西,求指点 this.mousePos=new Vector2(MouseManager.instance.mouseX, MouseManager.instance.mouseY); camera.viewportPointToRay(this.mousePos,ray); this.ps.rayCast(ray,this.rayCastHit,500, 0); 2018-12-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 ...

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

3. 射线检测有偏差 [ 85%]

...坐标,为射线检测偏差使用 public changeToClientWorld(input:Laya.Vector2):Laya.Vector2 { let ratioX = (input.x / Laya.stage.width); let ratioY = (input.y / Laya.stage.height); let clientWidth = Laya.stage.clientScaleX * Laya.stage.width let clientHeight = Laya.stage.clientScaleY * Laya.sta...

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

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

...;     private rotation:Laya.Vector3;     private lastPosition:Laya.Vector2;     private distance:number = 0.0;     private disVector1:Laya.Vector2;     private disVector2:Laya.Vector2;     private isTwoTouch:boolean;     private first:boolean;     private twoFirst:boo...

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

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

...;     private rotation:Laya.Vector3;     private lastPosition:Laya.Vector2;     private distance:number = 0.0;     private disVector1:Laya.Vector2;     private disVector2:Laya.Vector2;     private isTwoTouch:boolean;     private first:boolean;     private twoFirst:boo...

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

6. 求救,用了Stage.SCALE_SHOWALL之后,包围盒碰撞检测偏移 [ 78%]

...下,发现应该是             camera.viewportPointToRay(new Vector2(Laya.stage.mouseX,Laya.stage.mouseY),ray); 出了问题,用Stage.SCALE_SHOWALL前后,生成的射线位置不一样。 2018-02-27 0 1 分享 微博 QZONE 微信 c416288806 赞同来自: 。。。。?Laya还在放...

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

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

...     this.camera = null;         this.lastPosition = new Laya.Vector2(0, 0);         this.distance = 0.0;         this.disVector1 = new Laya.Vector2(0, 0);         this.disVector2 = new Laya.Vector2(0, 0);         this.isTwoTouch = false;         ...

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

8. 求问shader中的attribute变量怎么动态修改 [ 74%]

...; var transformUV:TransformUV = new TransformUV(); transformUV.offset= new Vector2();   2017-06-09 3 3 分享 微博 QZONE 微信 cuixueying 赞同来自: 我们先看下,晚些回复! 2017-06-09 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁...

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

9. 请问一下我一个3d模型,贴图是UV类型的里面好多张图,在代码里面怎么调用其它的贴图 [ 70%]

...                             transformUV.offset = new Vector2(0.099,0);                             mat.transformUV = transformUV;                         }                         var twoMc:MeshSprite3D = Sprite3D.instant...

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

10. 求ShuriKenParticle3D用法 [ 67%]

...rt ShurikenParticleMaterial = Laya.ShurikenParticleMaterial;     import Vector2                  = Laya.Vector2;     import Vector3                  = Laya.Vector3;     import Vector4                  = Laya.Vector4;     import Particle3...

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