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

大约有 45 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0050 秒)

1. 3D中摄像机绕物体旋转该如何实现? [ 100%]

...for move and rotate. /// </summary> ///[Range(0, 10)] public damper: number = 5; /// <summary> /// Camera current angls. /// </summary> public CurrentAngles: Vector3 = new Vector3(); public CurrentAnglesTemp: Vector3 = new Vector3(); /// <summary> /// Current distance from ca...

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

2. 官方案例里摄像机绕物体旋转脚本的问题 [ 99%]

...for move and rotate. /// </summary> ///[Range(0, 10)] public damper: number = 5; /// <summary> /// Camera current angls. /// </summary> public CurrentAngles: Vector3 = new Vector3(); public CurrentAnglesTemp: Vector3 = new Vector3(); /// <summary> /// Current distance from ca...

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

3. 求一个三角旋转的算法代码。 [ 98%]

...为D点  PointRoundVector( vector3d: Vector3, point3d: Vector3 ,  Aplha: number ): Vector3{                  let u:number = point3d.x;        let v:number = point3d.y;        let w :number = point3d.z;        let T :number= Aplha;        let axisU:Vector3 ;        Vect...

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

4. rigidBody.applyForce 物体不会移动 [ 93%]

...teSpace: Laya.Vector3 = new Laya.Vector3(0, 1, 0); private monster_init_x: number = 0; private monster_init_y: number = 0; private monster_init_z: number = 0; private trans: Laya.Vector3; private rigidBody: Laya.Rigidbody3D; private tmp_x: number = 0; private tmp_y: number = 0; private tmp_z: number...

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

5. 2.0版本可用的CameraMoveScript.ts [ 89%]

...pVector3: Laya.Vector3 = new Laya.Vector3();     protected lastMouseX: number;     protected lastMouseY: number;     protected yawPitchRoll: Laya.Vector3 = new Laya.Vector3();     protected resultRotation: Laya.Quaternion = new Laya.Quaternion();     protected tempRotationZ: Laya...

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

6. 求计算三角形夹角的Laya代码 [ 87%]

...Calculate(a:Laya.Vector3, b:Laya.Vector3, c:Laya.Vector3) {     let d_a:number = Laya.Vector3. distance(b, c);        let d_b:number = Laya.Vector3. distance(a, c);     let d_c:number = Laya.Vector3.distance(a, b);       //angleA表示A点的夹角     let angleA = Math.acos((d_b...

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

7. Vector 向量如何创建? 在2d微信小游戏中 [ 87%]

...。 * @param x X轴坐标。 * @param y Y轴坐标。 */ constructor(x?: number, y?: number); 传与不传都报错 笑笑 • 2019-08-29 16:56 请问找到解决办法了吗?

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

8. CameraMoveScript.as在哪儿下载群里的有错 [ 86%]

...*/ public class CameraMoveScript extends Script { protected var lastMouseX:Number; protected var lastMouseY:Number; protected var yawPitchRoll:Vector3 = new Vector3(); protected var resultRotation:Quaternion = new Quaternion(); protected var tempRotationZ:Quaternion = new Quaternion(); protected var...

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

9. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 85%]

...*/ public aniComplete:Boolean = true; /*角色移动速度*/ public speed:number = 0.04; /*3D摄像机*/ public camera:Laya.Camera; /*摇杆控制器*/ private rocker:RockerView; /*攻击按钮控制器*/ private attack:attackView; /*摇杆上一帧角度*/ private lastAngle:number = 0; /*检测移...

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

10. [laya2.0-2.3]CollisionUtils.ts bug [ 85%]

...ctsRayAndPlaneRP(ray:Ray, plane:Plane, out:Vector3):boolean { var distance:number; if (!CollisionUtils.intersectsRayAndPlaneRD(ray, plane, distance)) { out = Vector3._ZERO; return false; } Vector3.scale(ray.direction, distance, CollisionUtils._tempV30); Vector3.add(ray.origin, CollisionUtils._tempV3...

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