luoyikun

导航

统计

05 2017 档案

u3d与安卓交互(Android studio)
摘要:AndroidStudio导出 .jar文件,在Unity里使用 开发环境:as2.3.2.0,u3d5.6.0 as部分: 1.新建工程时的最低版本跟u3d中相同 2.Unity\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\mono\R 阅读全文

posted @ 2017-05-26 00:11 luoyikun 阅读(12) 评论(0) 推荐(0) 编辑

Git 遇到了 early EOF index-pack failed 问题
摘要:fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed git config --global --add core.compression -1 阅读全文

posted @ 2017-05-18 23:20 luoyikun 阅读(2) 评论(0) 推荐(0) 编辑

u3d拖动摄像机视角与双指缩放
摘要:using UnityEngine; using System.Collections; public class CamMove : MonoBehaviour { private float m_xSpeed = 250.0f; private float m_ySpeed = 120.0f; 阅读全文

posted @ 2017-05-18 11:43 luoyikun 阅读(16) 评论(0) 推荐(0) 编辑

u3d物体跟随摄像头旋转角度
摘要:void Update () { Quaternion rotation = Quaternion.LookRotation(transform.forward - m_arCam.transform.forward); transform.rotation = Quaternion.Lerp(tr 阅读全文

posted @ 2017-05-18 11:33 luoyikun 阅读(2) 评论(0) 推荐(0) 编辑

u3d协程控制匀速旋转角度
摘要:点击红色圈后,实现选中plane旋转至人物正前方 第一步:首先获取选中plane与正前方的夹角 float AngleGet(Vector3 from, Vector3 to) { Vector3 v3 = Vector3.Cross(from, to); if (v3.y > 0) return 阅读全文

posted @ 2017-05-18 09:25 luoyikun 阅读(5) 评论(0) 推荐(0) 编辑

u3d计算向量间夹角
摘要:float AngleGet(Vector3 from, Vector3 to) { Vector3 v3 = Vector3.Cross(from, to); if (v3.z > 0) return Vector3.Angle(from, to); else return 360 - Vecto 阅读全文

posted @ 2017-05-16 09:11 luoyikun 阅读(6) 评论(0) 推荐(0) 编辑

U3D判断触摸拖动的方向
摘要:Vector3 m_startPos; Vector3 m_endPos; bool m_down = false; void FingerSwipe() { if (Application.platform == RuntimePlatform.WindowsEditor) { if (Input 阅读全文

posted @ 2017-05-12 00:30 luoyikun 阅读(4) 评论(0) 推荐(0) 编辑

u3d单例类
摘要:public class Singleton<T> : MonoBehaviour where T : Singleton<T> { private static T instance; public static T Instance { get { return instance; } } // 阅读全文

posted @ 2017-05-04 10:26 luoyikun 阅读(6) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示