自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 资源 (4)
  • 收藏
  • 关注

转载 unity判断其它物体相对于自身方位以及角度

//求角度 及前后左右方位  public void checkTargetDirForMe(Transform target)  {      //xuqiTest:  target.position = new Vector3(3, 0, 5);      Vector3 dir = target.position - transform.position; //位置差,方向   ...

2018-12-03 14:59:16 1821

转载 unity新动画系统之IK动画

国际惯例,先来一段说明。IK动画全称Inverse Kinematics,即反向动力学,牵一发而动全身的既视感。代码如下:using System.Collections;using System.Collections.Generic;using UnityEngine;public class IK_test : MonoBehaviour {    Animator _an...

2018-12-03 14:31:28 1146

转载 Animator使用IK实现头部及身体跟随

我们在开发中往往会遇见需要视线或者说头部跟随一个物体移动的效果,这时就可以使用Animator中的IK Pass通道来完成。假定我们有这么一个需求,人的头部(眼镜需要跟随这个球(Target)的移动来移动)这时我们可以使用Animator中的IK Pass来实现需求。首先确定我们的角色的模型Rig的Animator Type为:Humanoid,因为我们会使用到Avatar Mas...

2018-12-03 14:02:36 1673

转载 【小松教你手游开发】【unity实用技能】unity 更漂亮的位移

更漂亮的位移指的是先慢再快再慢的这种位移,更像现实中的位移。也叫平滑阻尼。这里有两种实现方式:1.通过计算值:调的函数是Mathf.SmoothStep例:        float t = 0;        // Update is called once per frame        void Update()        {            if(sp...

2018-12-03 13:35:21 444

转载 基于Unity3D(UGUI)的背包系统(装备系统,锻造系统,购买系统)

好了,开始进入正题!先给出部分效果图:背包是用来存放角色在游戏中获得的物品,箱子是用来临时保存物品的(只有保存功能),角色面板是用来模拟给角色装备物品的,武器,服饰等,最右边红色字体的面板是用来显示当前装备下角色的各个属性总和 商贩面板功能主要是用来给玩家购买物品和卖掉自己物品,另外看到左边黑色的那块(里面的字体五颜六色的),用来显示每个物品的属性。还有右上角的硬币图样用来显示...

2018-11-29 13:28:13 1697 2

转载 TransformPoint和TransformDirection函数

TransformPoint:将子物体的相对坐标转换为世界坐标Vector3 wantedPosition = target.TransformPoint(x_, height, -distance);得到的wantedPosition为   localPosition为(x_,height,-distance)的target的子物体的  世界坐标Transform...

2018-03-22 10:40:22 831

转载 unity3d InverseTransformPoint方法

从歪果仁的脚本里看到了这个方法,查脚本,看脚本说明也没看懂,官方的说明是,变换位置从世界坐标到自身坐标,Transform.TransformPoint相反。试验了一下得出这个结论,如果某一个物体A的坐标相对于世界坐标是(1,2,1), 物体target的坐标相对于世界坐标是(3,1,2)Vector3 targetPos = target.transform.position;Vector3 ...

2018-03-21 18:16:12 14072

转载 C# - Object2Terrain.cs obj转Terrain (转载)

using UnityEngine;using UnityEditor; public class Object2Terrain : EditorWindow {  [MenuItem("Terrain/Object to Terrain", false, 2000)] static void OpenWindow () {  EditorWindow.GetWindow<O...

2018-03-20 13:47:56 983

转载 Unity3D中的地形转成模型

using UnityEngine;using UnityEditor; using System; using System.Collections; using System.IO;using System.Text; enum SaveFormat { Triangles, Quads }enum SaveResolution { Full=0, Half, Quarter, Eighth,...

2018-03-13 13:23:20 706

原创 unity Editor 下Assetbundle 打包

using UnityEngine; using System.Collections;using UnityEditor; using System.IO;public class CreateAssetBundle : MonoBehaviour { [MenuItem(“Custom/Create Object to It’s Single Bundle”)] st

2017-12-19 09:33:58 453

原创 unity pc端 采用右键选择相机,中键盘移动缩放模型

using UnityEngine; using System.Collections;public class CameraMove : MonoBehaviour { public Texture2D cur; public Texture2D[] cursors; public float rotateSpeed; public float wheel

2017-12-19 09:28:14 345 1

原创 unity Editor 下批量导出Perfab ,更改模型shader,添加删除组件

using UnityEngine; using System.Collections; using UnityEditor;public class PrefabChange : Editor {[MenuItem("Tools/BatchPrefab All Children")] static void BatchPrefab(){ Transform tParent = ((G

2017-12-19 09:25:09 520

原创 untiy 点击屏幕和button 冲突的时候解决方法

这个问题我是不用button。把button用图片显示。不同的按钮采用不同的ta个。然后从相机发一个射线。碰到哪个tag就执行哪个方法。RaycastHit hit;    void PointScreen()    {        if (Input.GetMouseButtonDown(0)) {                        Ray ray 

2016-05-24 18:06:17 1902

原创 照相功能 高通AR

这里需要两脚本  ScreenFade:负责屏幕闪光    TakePhotoPicture :负责照相  我用了一个插件:Cross Platform Native Plugins - Ultra Pack /*---------------------------------------------------------------------------------Allo

2016-05-24 15:57:32 442

原创 unity 过度条场景

using UnityEngine;using UnityEngine.UI;/// /// UGUISceneLoader script./// This is used to show the progress of scene loading./// public class UGUISceneLoader : MonoBehaviour{public

2016-05-16 17:51:40 498

原创 unity 单例脚本

using UnityEngine;using System.Collections;public class SoundManager : MonoBehaviour {private static SoundManager instance;// Public static reference that can be accesd from an

2016-05-16 17:50:24 609 1

原创 unity 陀螺仪的脚本

using UnityEngine;using System.Collections;using System.Collections.Generic;namespace MSP_Input {public class GyroAccel : MonoBehaviour {public bool forceAccelerometer = false;publ

2016-05-16 17:49:20 2225

原创 unity 事件的触发脚本

三个脚本分别挂在三个物体上。using UnityEngine;using System.Collections;public class MyDelegateClass : MonoBehaviour {public delegate  int myDelegate(float f);public sta

2016-05-16 17:47:21 1452

原创 手指触摸滑动物体带惯性的旋转 以及放大缩小(用插件easytouch 控制物体的旋转和缩放)

using UnityEngine;using UnityEngine.UI;using System.Collections;public class AR_TouchController : MonoBehaviour {public GameObject[] scaleGameobject = new GameObject[]{} ;public

2016-05-16 15:02:01 5999

转载 unity 手指移动物体旋转两个手指控制物体大小缩放

using UnityEngine;  using System.Collections;  using System.IO;  public class ScaleAndRotate : MonoBehaviour  {      private Touch oldTouch1;  //上次触摸点1(手指1)      private Touch oldTouch2;

2016-05-11 15:52:25 5240 4

原创 unity 手指旋转物体双手控制相机的远近

using UnityEngine;using System.Collections;using UnityEngine.UI;public class touchmove : MonoBehaviour {    float speed =0.1f;    public GameObject Target;    public float minDistance;  

2016-05-11 15:44:24 2160

原创 手指在屏幕上的移动来旋转物体

using UnityEngine;using System.Collections;using UnityEngine.UI;public class touchmove : MonoBehaviour {    float speed =0.1f;    // Use this for initialization    void Start () {     

2016-05-11 15:06:59 735

原创 unity 通过触摸屏幕产生射线实例化玩家

using UnityEngine;using System.Collections;public class AndroidCreateObj : MonoBehaviour {    public GameObject player;  //定义玩家对象    float num = 0;       //定义实例化的玩家数量    // Update is calle

2016-05-11 14:37:15 1925

原创 unity 按下鼠标左键随机生成物体Instantiate

using UnityEngine;using System.Collections;public class CreateObj : MonoBehaviour {    public GameObject car;    public float produceRate = 0.5f;    private float nextProduce = 0;    // 

2016-05-11 14:32:32 6037

原创 unity  通过键盘控制角色的移动和旋转

using UnityEngine;using System.Collections;public class MoveObj : MonoBehaviour {    float speed = 10.0f;   //移动速度    float rotationSpeed = 100.0f;  //旋转速度    // Update is called once pe

2016-05-11 14:25:41 14669

原创 unity 根据鼠标的移动来旋转物体Rotate

using UnityEngine;using System.Collections;public class RotateObj : MonoBehaviour {    float horizontalSpeed = 2.0f;    float verticalSpeed = 2.0f;    // Update is called once per frame 

2016-05-11 14:16:10 1142

原创 unity 相机平滑的接近物体脚本 Mathf.Smooth

using UnityEngine;using System.Collections;public class example : MonoBehaviour {public Transform target;public float smoothTime = 0.3F;private float yVelocity = 1.0F;void Update() {

2016-05-11 14:13:21 623

原创 unity 用鼠标控制相机绕着物体旋转脚本

using UnityEngine;using System.Collections;public class RotateObj : MonoBehaviour {    public GameObject cube;    float horizontalSPeed =2.0f;    float verticalSpeed = 2f ;    float x,

2016-05-11 14:08:26 5582 1

原创 unity Character Controller 参数

Skin Width: 皮肤厚度。该参数决定了两个碰撞体可以相互渗入的深度,较大的参数值会产生抖动现象,较小的参数值会导致所控制的游戏对象被卡住,较为合理的设置是该参数值为Radius值的10%。Character Controller不会对施加给他的作用力做出反应,也不会作用于其他的刚体。如果想让Character Controller组建能够够作用于其他的刚体对象,可以通过脚本【OnCon

2016-05-09 11:06:54 1437

原创 UNITY Rigidbody 参数设置

is Kinematic : 是否开启动力学。若开启此项,游戏对象将不再受物理引擎影响从而只能通过Transform(几何变换组件)属性对其操作。该方式适用于模拟平台的移动或带有铰链                         关节链接刚体的动画。interpolate :插值。该项用于刚体的抖动情况,有三个选项可供选择。none:没有插值。 interpolate: 内插值。基于前一帧的

2016-05-09 10:21:39 3944

Two sided.shader

unity 双面材质,可以接收阴影和光照,到透明通道,从国外找到的

2019-10-24

AVPro Movie Capture Version 3.6.8

(此免费版本允许最多拍摄10秒,没有水印!),可以拍照。录屏

2018-12-21

2460Pre-Integrated Skin Shader v2.0.6

2460Pre-Integrated Skin Shader v2.0.6 unity皮肤插件,不支持ios平台,效果不错,拿来测试可以使用,禁止商用

2018-12-21

Unity skin shader

untiy 皮肤插件最新版本,skinShader3.0 10美元asset商店买的,只用来测试使用。禁止商用

2018-12-21

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除