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

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

471. 射线检测报错,outHitInfo.sprite3D=null; [ 42%]

...Manager.instance.mouseX,Laya.MouseManager.instance.mouseY),this.ray); Laya.Physics.rayCast(this.ray,this.hit); console.log("当前射线碰撞的信息是:" + this.hit.sprite3D.name); //摄像机位置 var position:Laya.Vector3=new Laya.Vector3(this.camera.position.x, 0, this.camera.position.z); //...

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

472. Cannot read property 'toDefault' of undefined报错是什么原因 [ 42%]

...ToRay(this.point, this.ray); //11111111111111就是下面这句报错 Laya.Physics.rayCast(this.ray, this._outHitInfo, Number.MAX_VALUE, 10); if (this._outHitInfo.sprite3D.name === "tlj"){ isRotate = !isRotate; } // this.phasorSpriter3D.begin(Laya.WebGLContext.LINES, state); // //绘出射线 // thi...

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

473. laya 3D碰撞器与 Unity 不一致问题 [ 41%]

...Transform的Scale导致的,可以修改laya.d3.js文件里的_innerDerivePhysicsTransformation方法,加粗部分为补丁: if (shapeOffset.x !== 0 || shapeOffset.y !== 0 || shapeOffset.z !== 0) {                 var physicPosition = PhysicsComponent._tempVector30;              ...

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

474. 节点组件的详细介绍(TypeScript-IDE篇(TS)-设计模式基础) [ 40%]

...、滤镜组件(Filters),绘图组件(Graphics)、物理组件(physics)、UI组件(UI)、公共组件(common),如图1所示。 ![图1](img/1.png) (图1) 在这些组件里,通过继承关系的不同,可以分成组件、UI组件、视图组件、基础显示组件,...

来源: Laya2.0_文档 发布时间: 20210714

475. LayaNative在Android 11上启动闪退 [ 38%]

...项目   2、文件-项目设置-类库设置,勾选物理引擎库laya.physics3D.js   3、使用工具构建一个Native工程   4、使用Android Studio打开工程,把目标API改成30   5、编译运行在Android 11系统的手机上 5、游戏启动时闪退   下面的Crash可做参...

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

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

... this.ray.origin = rayOrigin; //物理射线与碰撞器相交检测 Laya.Physics.rayCast(this.ray,this.outHitInfo,5); //------------------------------------------------TODO_WPP 碰撞器生成有问题?? 应该是outHitInfo.distance -1 这个问题 // //如果未有碰撞则返回 // if(this.ou...

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

477. 物理系统 · LayaAir3.4 · 引擎文档 · LAYABOX [ 37%]

... 就是把两者对齐的桥梁。 在引擎源码里,这个比例会被 Physics2DWorldManager 读取并缓存为 _pixelRatio 与 _RePixelRatio=1/_pixelRatio,用于坐标/长度的双向换算;同时它也会被写入 box2DWorld._pixelRatio,供 WASM 物理工厂在创建形状、关节、刚...

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

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

...ew Laya.BlinnPhongMaterial();     Laya.Texture2D.load("res/threeDimen/Physics/grass.png", Laya.Handler.create(this, function (tex) {       planeMat.albedoTexture = tex;     }));     //设置纹理平铺和偏移     var tilingOffset = planeMat.tilingOffset;     ti...

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

479. 屏幕适配 · LayaAir3.4 · 引擎文档 · LAYABOX [ 35%]

...宽高*DPR计算而来。 引擎中的相关代码如下: /** * @en The physical width of the browser window, taking into account the device pixel ratio. * @zh 浏览器窗口的物理宽度,考虑了设备像素比。 */ static get width(): number { Browser.__init__(); return ((ILaya.stage &amp...

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

480. 有关Laya3D碰撞检测疑问 [ 33%]

...oint, this.ray);  //射线检测获取所有检测碰撞到的物体 Laya.Physics.rayCastAll(this.ray, this._outHitAllInfo, 30, 0); }  private loadUI(): void {  this.label = new Laya.Label(); this.label.text = "点击选取的几何体"; this.label.pos(Laya.Browser.clientWidth / 2.5, 100); this.l...

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