大约有 41 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0039 秒)
...ay.origin = rayOrigin; //物理射线与碰撞器相交检测 Laya.Physics.rayCast(this.ray, this.outHitInfo, 0); console.log("x:" + rayOrigin.x + " y:" + rayOrigin.y + " z" + rayOrigin.z) this.phasorSpriter3D.begin(Laya.WebGLContext.LINES, LayaAir3D.camera); this.phasorSpriter3D.line(this._linePos,...
来源: Laya_社区 发布时间: 20180316
...mouseY; this.camera.viewportPointToRay(this.point, this.ray); Laya.Physics.rayCast(this.ray, this._outHitInfo) 然后: this.camera.viewport.project(this._outHitInfo.position, this.camera.projectionViewMatrix, this._outPos); var x = this._outPos.x / Laya.stage.clientScaleX; var y = this._outPos.y /...
来源: Laya_社区 发布时间: 20180613
...r3(0, 0, 0)); this.point = new Laya.Vector2(); this._outHitInfo = new Laya.RaycastHit(); this.phasorSpriter3D = new Laya.PhasorSpriter3D(); this.camera = this.addChild(new Laya.Camera(0, 0.1, 100)); this.camera.transform.translate(new Laya.Vector3(0, 1, 3)); //camera.addComponent(CameraMoveScript); ...
来源: Laya_社区 发布时间: 20170323
...2 = new Ray(new Vector3(0,0,0),new Vector3(0,-10,0)); //创建碰撞信息 rayCastHit2 =new RaycastHit(); //针循环 public function _update():void { //刷新人物位置,_position是缓动函数实时更新的坐标 roleModel.transform.position = _position; //设置射线...
来源: Laya_社区 发布时间: 20170828
...ya.Vector3(); _corners[7] = new Laya.Vector3(); var _outHitInfo = new Laya.RaycastHit(); var _outHitAllInfo = new Array(); var _posiV3 = new Laya.Vector3(); var _scaleV3 = new Laya.Vector3(); var _rotaV3 = new Laya.Vector3(0, 1, 0); var _scale = 1; var _scaleIndex = -1; var _color = new Laya.Vector4...
来源: Laya_示例 发布时间: 20241118
...的形状拼出地形 Mr.余 • 2018-06-12 13:55 @Laya_Aaron:Laya.Physics.rayCast这函数是检查不到MeshCollider的吗。感觉laya很多东西都不全面啊-。
来源: Laya_社区 发布时间: 20180530
...eneScript extends Laya.Script{ private ray : Laya.Ray; private hit: Laya.RaycastHit; private phasorSprite3D:Laya.PhasorSpriter3D; private camera : Laya.Camera; private scene: Laya.Scene; public _load(owner : any):void{ this.scene = owner; this.camera = this.scene.scene.getChildByName("Main Camer...
来源: Laya_社区 发布时间: 20181020
...r3(0, 0, 0)); this.point = new Laya.Vector2(); this._outHitInfo = new Laya.RaycastHit(); // this.phasorSpriter3D = new Laya.PhasorSpriter3D(); } MousePickingScene.prototype.lateRender = function (state) { MousePickingScene.__super.prototype.lateRender.call(state); //从屏幕空间生成射线 this....
来源: Laya_社区 发布时间: 20170323
...测的方法有4个,分别为射线检测第一个碰撞物体的方法`raycast` 和 `raycastFromTo`以及射线检测所有碰撞物体的方法`raycastAll`和`raycastAllFromTo`。 检测一个和所有的区别比较容易理解,就是碰到第一个物体后射线立即结束,和射线可...
来源: Laya2.0_文档 发布时间: 20210715
...线*/ private ray:Laya.Ray; /*碰撞检测信息*/ private outHitInfo:Laya.RaycastHit; constructor() { super(); this.ray = new Laya.Ray(new Laya.Vector3(0,0,0),new Laya.Vector3(0,-2,0)); this.outHitInfo = new Laya.RaycastHit(); } /*覆写3D组件方法,指3D对象加载组件时执行 *owner:此...
来源: Laya_社区 发布时间: 20171113