大约有 53 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0032 秒)
3D坐标系转换 Laya.Vector3.transformCoordinate(worldPos, this.owner.transform.localMatrix, this._tempPos); 我想将一个世界坐标转换到某个Sprite3D的本地坐标,上面这种写法,的出来的结果不对,所以问下应该怎么转换 2018-07-19 添加评论 免费帖 --> 分...
来源: Laya_社区 发布时间: 20180719
...同来自: let out = window.app.fcUtil.worldToViewportPoint(this.owner.transform.position, window.GameMag.Camera1); this.hpNode.x = out.x - this.hpNode.width / 2 this.hpNode.y = out.y + this.hpNode.height *3.5 //this.owner.transform 3d的物体 //this.hpNode 2d的ui //3d坐标转2d...
来源: Laya_社区 发布时间: 20201110
..., 目测bug原因是 laya.cannonPhysics.js 内的_innerDerivePhysicsTransformation 方法中,错误的将 colliderShape.localOffset 的世界坐标,设置成了 transform.position 。导致物体会一直匀速移动。 _innerDerivePhysicsTransformation(physicTransformOut, force) { var tra...
来源: Laya_社区 发布时间: 20210904
...his.scene.ambientColor = new Laya.Vector3(1, 1, 1); camera.transform.translate(new Laya.Vector3(0,0.8,1.5)); camera.transform.rotate(new Laya.Vector3( -15, 0, 0), true, false); // var camera:Laya.Camera = this.scene.addChild(new Laya.Camera(0, 0.1, 100)) as...
来源: Laya_社区 发布时间: 20190531
...ody.colliderShape as Laya.BoxColliderShape let y:number = this.transform.position.y-bc.sizeY/2 - 0.05 let vec3:Laya.Vector3 = new Laya.Vector3(this.transform.position.x,y,this.transform.position.z); var ray = new Laya.Ray(vec3,new Laya.Vector3(0,0,1)); ...
来源: Laya_社区 发布时间: 20190905
...上OK,移动端没试,有问题调试着改一改就OK啦。。import Transform3D = Laya.Transform3D; import Vector3 = laya.d3.math.Vector3; import Quaternion = laya.d3.math.Quaternion; /* 用法: //初始化照相机 var camera = this.newScene.addChild(new Laya.Camera(0, 0.1, 100)) as Laya.Ca...
来源: Laya_社区 发布时间: 20190224
..."相机位置",(this.owner.getChildByName("Main Camera") as Laya.Sprite3D).transform.position) } onStart(): void { Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.onMouseDownCb) } private onMouseDownCb(e:Laya.Event):void{ console.log("点击屏幕") // console.log("相机位置",this.camera.) th...
来源: Laya_社区 发布时间: 20190621
...me = "camera"; //相机平移位置 camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5)); //旋转相机 camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); //创建平行光 ...
来源: Laya_社区 发布时间: 20190605
...me = "camera"; //相机平移位置 camera.transform.translate(new Laya.Vector3(0, 0.8, 1.5)); //旋转相机 camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); //创建平行光 ...
来源: Laya_社区 发布时间: 20190531
...刚体。 这有点像子父级关系,但是是通过物理而非变换(Transform)层次结构实现的。 固定约束非常适合你想能够轻松地分离的对象,或在变换(Transform)层次结构中没有子父级关系的情况下连接两个对象的运动。 **在LayaAir中使用Fixed...
来源: Laya2.0_文档 发布时间: 20210715