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

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

41. 2D物理-碰撞事件与传感器 [ 83%]

...this.touching[i]) { continue; } let bodyA: RigidBody = this.sensorCollider.owner.getComponent(RigidBody); let bodyB: RigidBody = body.owner.getComponent(RigidBody); let bodyOriA = bodyA.getBody(); let bodyOriB = bodyB.getBody(); let position = bodyOriB.GetPosition(); // let center = bodyOriA.GetPosi...

来源: Laya2.0_示例 发布时间: 20251130

42. 两个物体发生碰撞的时候,如何让他检测碰撞点的位置 [ 83%]

....m_manifold.localNormal;     let point = {          x: collider.owner.x - collider.radius * local.x,         y: collider.owner.y - collider.radius * local.y     }     console.log(point); }   其中b是CircleCollider,如果b是BoxCollider,代码修改如下:     let p...

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

43. laya.d3.renderobjs.nativeobj.NativeRenderElementOBJ_API3.0 [ 83%]

...ments IRenderElement Index Constructors constructor Properties _nativeObj _owner _shaderInstances Accessors _geometry _invertFront _isRender _materialShaderData _renderShaderData _transform Methods _addShaderInstance _clearShaderInstance _destroy _render init Constructors constructor new NativeRende...

来源: Laya3.0_api 发布时间: 20231115

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

...没问题   模型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

45. 3D 触发器如何获取碰撞位置 [ 83%]

...lisionEnter(obj: Laya.Collision) { let node: Laya.MeshSprite3D = obj.other.owner as Laya.MeshSprite3D; let owner: Laya.MeshSprite3D = this.owner as Laya.MeshSprite3D; let position = obj.contacts[0].positionOnA; // 碰撞位置 }     onTriggerEnter(obj) 、、如何获取碰撞位置? 2020-04-08 ...

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

46. laya.d3.core.pixelLine.PixelLineFilter [ 83%]

...用于线过滤器。 Public Methods  MethodDefined By  PixelLineFilter(owner:PixelLineSprite3D, maxLineCount:int)PixelLineFilter  _getLineData(index:int, out:PixelLineData):void 获取线段数据 PixelLineFilter  _getType():int[override] 获取几何体类型。 PixelLineFilter  _prepareR...

来源: Laya2.0_api 发布时间: 20190513

47. laya.d3.component.physics.MeshCollider [ 83%]

...件。 Collider  mesh : BaseMesh 获取碰撞器网格。 MeshCollider owner : ComponentNode[read-only] 获取所属Sprite3D节点。 Component3D started : Boolean是否已执行start函数。Component3DPublic Methods Hide Inherited Public Methods Show Inherited Public Methods MethodDefined By...

来源: laya_api 发布时间: 20170929

48. laya.d3.renderobjs.nativeobj.NativeInstanceRenderElementOBJ_API3.0 [ 82%]

...ments IRenderElement Index Constructors constructor Properties _nativeObj _owner _shaderInstances Accessors _geometry _invertFront _isRender _materialShaderData _renderShaderData _transform drawCount Methods _addShaderInstance _clearShaderInstance _destroy _render addUpdateBuffer clear getUpdateData...

来源: Laya3.0_api 发布时间: 20231115

49. laya.d3.renderobjs.nativeobj.NativeBaseRenderNode_API3.0 [ 82%]

...essors bounds boundsChange castShadow distanceForSort geometryBounds layer owner receiveShadow renderId renderbitFlag staticMask transform Constructors constructor new NativeBaseRenderNode(): NativeBaseRenderNode Defined in laya/d3/RenderObjs/NativeOBJ/NativeBaseRenderNode.ts:12 Returns NativeBaseRe...

来源: Laya3.0_api 发布时间: 20231115

50. 鼠标脚本(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 82%]

...---Script3D中的鼠标事件。如果想要使用鼠标脚本,在脚本owner上还是需要有物理碰撞器。 **Tips**:鼠标脚本依赖射线检测,只不过不用开放者自己手动创建射线了。 **鼠标脚本内容:** > Method `onMouseClick():void` 鼠标点击时执行 `onMou...

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