大约有 82 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0036 秒)
...ld, OnDisable则移除, onUpdate里面根据CANNONBody的信息更新(this.owner as Laya.MeshSprite).transfrom.(最好用插值,平滑点,四元数代码就拷贝Laya源码改改.) isKinematic 则根据(this.owner as Laya.MeshSprite).transfrom的位置信息更新CANNONBody 2020-02-26 0 2 分享 微...
来源: Laya_社区 发布时间: 20200217
...ce.mainCamera.viewportPointToRay(this._rayPt, this._ray); let scene = this.owner.scene as Laya.Scene3D; scene.physicsSimulation.rayCast(this._ray, this._raycastHit); console.log(this._raycastHit.succeeded); if(this._raycastHit.succeeded) console.log(this._raycastHit.collider.owner.name); } GameManag...
来源: Laya_社区 发布时间: 20190319
...prefab是带时间轴动画的,绑定了脚本,实例化出来后 this.owner如何播放动画啊? var prefabInstantce=this.owner as Laya.Animation; prefabInstantce.play("aniRota") 我就是想直接播放自身的动画而已 2019-06-16 添加评论 免费帖 --> 分享 微博 QZONE ...
来源: Laya_社区 发布时间: 20190616
...; } onEnable(): void { //设置初始速度 let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: any, contact: any): void { //如果被碰到,则移除子弹 this.owner.removeSelf(); } onUpdate(): void { //如果...
来源: Laya3.0_文档 发布时间: 20251010
... Laya.Physics.I.allowSleeping = false; this.strWorldRoot= this.owner.scene.strWorldRoot; Laya.Physics.I.worldRoot = this.strWorldRoot; } onUpdate(): void { var playerPos=new Laya.Point(this.cameraPlayerOffset.x,this.cameraPlayerOffset.y); v...
来源: Laya_社区 发布时间: 20231123
...nderer: Laya.ShurikenParticleRenderer; onAwake(): void { (this.p3dRenderer.owner as Laya.Sprite3D).transform.localPosition = new Laya.Vector3(0,5,5); this.p3dRenderer.particleSystem.simulationSpeed = 10; } 通过暴露@property( { type : Laya.ShurikenParticleRenderer } )组件类型属性,来拖...
来源: Laya3.0_文档 发布时间: 20251010
....0.3 的VideoNode不支持在微信浏览器中播放 let videoNode = this.owner.getChildByName("VideoNode") as Laya.VideoNode; videoNode.source = 'xxx.mp4'; videoNode.play(); // 上面代码在PC端安卓苹果等自带浏览器支持视频播放,但是在微信浏览器无任何显示。 let mat...
来源: Laya_社区 发布时间: 20230825
...rue; this.twoFirst = true; } onStart(){ this._scene = this.owner.parent as Laya.Scene3D; this._text = this._scene.parent.getChildByName("ceshi") as Laya.Text; this._camera = this._scene.getChildByName("camera") as Laya.Camera; } onUpdate(){ var touchCo...
来源: Laya_社区 发布时间: 20190531
...某个架的时候,我获取点击的子节点改变反照率颜色 this.owner.getChildAt(0).meshRenderer.sharedMaterial.albedoColor = new Laya.Vector4(0.0, 1.0, 0.0, 1.0); 然后,所有架子的这个子节点都改变了. 附件 : --> 2019-04-16 添加评论 免费帖 --> 分享 微博 QZONE ...
来源: Laya_社区 发布时间: 20190416
... var ray = new Laya.Ray(vec3,new Laya.Vector3(0,0,1)); (this.owner.scene as Laya.Scene3D).physicsSimulation.rayCast(ray,this.outHitResult); if(!this.outHitResult.succeeded){ return false; } return this.outHitResult.collider } ...
来源: Laya_社区 发布时间: 20190905