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

大约有 336 项符合查询结果, 库内数据总量为 30,934 项。 (搜索耗时: 0.0043 秒)

61. 3D变换 · LayaAir3.3 · 引擎文档 · LAYABOX [ 86%]

...也是三维图形世界的基础。LayaAir中实现三维变换用到了Transform3D这个类,包含了平移变换、旋转变换、缩放变换等。 本节以一个立方体模型演示这些变换。在LayaAir IDE中创建一个“3D空项目”,打开项目后,IDE已经默认创建了一...

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

62. 你先用Laya.timer.frameLoop 然后再用tween才可以生效 直接用tween没用 [ 86%]

...Sprite3D = scene.getChildByName("monkey") as Laya.Sprite3D;    aniMonkey.transform.position = new Laya.Vector3(math,math,math); } Laya.Tween.to(aniMonkey.transform.position, { x: math1, y: aniMonkey.transform.position.y, z: aniMonkey.transform.position.z }, 5000);         2018-01-17 0 0 分享...

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

63. laya.d3.renderobjs.nativeobj.NativeTransform3D_API3.0 [ 85%]

...d Externals Only exported Menu Globals "laya/d3/RenderObjs/NativeOBJ/NativeTransform3D" NativeTransform3D Class NativeTransform3D Transform3D 类用于实现3D变换。 Hierarchy Transform3D NativeTransform3D Index Constructors constructor Properties _nativeObj MemoryBlock_size tmpVec3 Accessors loc...

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

64. 下面这段unity碰撞代码如何用laya2.0物理引擎实现 [ 85%]

...at newImpulsePercent, float impulseForce) {     Vector3 a = base.transform.position - collision.gameObject.transform.position;     float num = -(newImpulsePercent * impulseForce / 100f);     num = Mathf.Clamp(num, -impulseForce, impulseForce);     a.Normalize();  ...

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

65. 3D基础显示对象 · LayaAir3.3 · 引擎文档 · LAYABOX [ 85%]

...Material; // 添加到场景 this.scene.addChild(box); // 设置位置 box.transform.position = new Laya.Vector3(2.0, 0.25, 0.6); box.transform.rotate(new Laya.Vector3(0, 45, 0), false, false); /* 球体 */ let sphere = new Laya.Sprite3D; let sphereMesh = sphere.addComponent(Laya.MeshFilter); let sp...

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

66. rigidBody.applyForce 物体不会移动 [ 85%]

...ildByName( "Monster1" ) as Laya.Sprite3D; scene.addChild(Monster); Monster.transform.translate( new Laya.Vector3(monster_position_x, 0, monster_position_z) ); this.monster_character = Monster; // this.master_turn(); //添加自定义模型 var box: Laya.MeshSprite3D = this.scene.addChild( new Laya.M...

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

67. 自定义shader-边缘光照shader [ 85%]

...ene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.translate(new Laya.Vector3(0, 0.85, 1.7)); camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false); camera.addComponent(CameraMoveScript); var directionLight = scene.addChild(new Laya.DirectionLight()); di...

来源: Laya_示例 发布时间: 20250311

68. 3D项目,,模型默认朝向的问题,,, [ 84%]

...向,在场景里面创建出来2个,   第一个: this._mainPlayer.transform.position = new Vector3( 0,0,1 ); 第二个: this._npc.transform.position = new Vector3( 0,0,4 );   然后调用: this._npc.transform.lookAt( this._mainPlayer.transform.position,new Laya.Vector3(0,1,0) ); 发现 ...

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

69. 为什么rotation、scale赋值了不管用? [ 84%]

...3D: this.role3D = Laya.MeshSprite3D.load("3d/ben/Export.lh") this.role3D.transform.scale = new Laya.Vector3(0.5,0.5,0.5); this.role3D.transform.position = new Laya.Vector3(0,20,0); 以上的scale、position设置均不起作用,但是我放到frameloop里就有用,请问这是为什么?要...

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

70. Laya3.0 获取物体初始位置错误 [ 83%]

... Laya_Fred 赞同来自: 您好,在初始化this.initPos = this.rabbit.transform.postion;的时候,实际长拿到的是rabbit.transform.postion的引用,所以在修改rabbit.transform.position之后,打印的this.initPos也会同步变化;要解决这个问题可以获取rabbit.transform...

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