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

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

11. 如何通过四元数旋转 [ 74%]

...: GetComponent<Rigidbody>().AddForce ( Quaternion.Euler (new Vector3(transform.rotation.eulerAngles.x,transform.rotation.eulerAngles.y,transform.rotation.eulerAngles.z)) *new Vector3(25f*length,0,0), ForceMode.VelocityChange); 大概的须求是2d场景,旋转鼠标,炮台也跟着旋转...

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

12. laya 3D碰撞器与 Unity 不一致问题 [ 74%]

...移 laya预览效果与Unity运行效果一致   将下图上方的cube Transform属性的Scale 设置为5:1:1的比例将X轴 Scale 拉伸5倍后 再讲BoxCollider的Center属性 x 设置为偏移 -0.3 得到如下效果     接下来我们来看看unity 的运行效果: unity 运行效果图...

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

13. 为什么动态设置聚光灯朝向无效呢 [ 74%]

...ar tar = new Laya.Vector3(); var dir = new Laya.Vector3(); var src = model.transform.position; spotLight.transform.position = camera.transform.position; Laya.Vector3.subtract(src, camera.transform.position,tar); Laya.Vector3.normalize(tar, dir); spotLight.direction = dir; 目的是让聚光灯,始...

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

14. rotate设置的值和获取的值不一样 [ 72%]

rotate设置的值和获取的值不一样 this.transform.rotate(new Vector3(0, 1.68, 0)); trace(">>>>>rotate>>>>" + transform.localRotation.y); trace(">>>>>rotate>>>>" + transform.rotation.y); 设置的旋转和输出的旋转值不一样,这...

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

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

...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

16. 如何限制旋转角度 [ 71%]

如何限制旋转角度 我用sphere.transform.rotate(vecty,false,false); 旋转这个球体的X轴角度,假定是个地球仪,怎么限制转到北极或南极就不让它转了,如果转到北极或南极仍然能继续转的话,地球就成倒置的,不符合实际需求,怎么处...

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

17. localRotationEulerY旋转位置错误 [ 70%]

...(new Laya.Camera(0, 0.1, 100)) as Laya.Camera;         camera.transform.translate(new Laya.Vector3(0, 6, 9.5));         camera.transform.rotate(new Laya.Vector3(-15, 0, 0), true, false);          //方向光         var directionLight = new Laya.Dire...

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

18. 3d物体冲量跟设置translate冲突 [ 69%]

...方式控制物体的运动状态,第一种是物理控制,第二种是transform控制。两种方式只能选择其中一种,设置isKinematic = false后你只能用物理控制物体,给物体一个大于等于物体阻力的力物体就会运动,使用transform无效。设置isKinematic...

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

19. Laya.Sprite3D如何设置位置 [ 67%]

...搜索,别说模糊查找。我都写明了都搜索不到) layaMonkey.transform.translate( new Laya.Vector3(100,500,100)); layaMonkey.transform.position = new Laya.Vector3(100,500,100); 2018-06-04 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

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

20. pivot 设置后 影响 元素大小??????????????? [ 66%]

...0,_core.height); tf.translate(_core.p1.x,_core.p1.y-_core.height); page[1].transform=tf; 我全用transform了, 达到了想要的效果 cuixueying • 2016-12-14 14:14 好的,有问题及时沟通!

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