自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

转载 Unity之射线穿透

   一般的射线射中物体后就被阻挡了,假如碰到物体后,就会被拦截。如果我们想实现穿透某些物体,或者使射线不穿透UI的话。这时候就需要穿透的知识了。下面写一个简单的射线。 public Transform RayStartPoint;private Ray ray;// Use this for initialization void Start (){       ...

2018-11-18 09:15:55 6593 1

转载 [转]OnTriggerEnter和OnCollisionEnter的区别和用法

OnTriggerEnter和OnCollisionEnter的触发条件是不同的,需要在设计的过程中加以关注。触发的共同要求碰撞的两个物体A,B,都要有碰撞体(collider),Box Collider,Sphere Collider,Capsule Collider等的任意一种当A,B都添加刚体(Rigidbody)时OnCollisionEnter方法 A和Bx相互碰撞时,...

2018-11-14 23:49:15 411

转载 unity3d-代码控制游戏角色控制器移动

https://blog.csdn.net/wjlsxl_whb/article/details/53031803zz

2018-04-26 00:38:37 1952 1

转载 Physics.IgnoreLayerCollision 忽略碰撞层 static function IgnoreLayerCollision (layer1 : int, layer2 : int,

Physics.IgnoreLayerCollision 忽略碰撞层static function IgnoreLayerCollision (layer1 : int, layer2 : int, ignore : bool = true) : voidDescription描述Makes the collision detection system ignore all collisions ...

2018-04-26 00:29:00 1044

转载 导弹追踪

using UnityEngine;  using System.Collections;  public class AIFollow : MonoBehaviour {  public GameObject man;  public GameObject missile;  public float manSpeed = 6f;  public

2017-03-30 09:25:14 1053

转载 int string类型转化

1、int-->string1 int a = 15;2 string s1 = a.ToString();3 string s2 = Convert.ToString(a);2、string -->int1 string s = "18";2

2017-03-29 22:15:52 394

原创 三角函数换算

public string sin(double a)    {        return Math.Sin(Math.PI * (a / 180)) + "";    }    public string cos(double a)    {        return Math.Cos(Math.PI * (a / 180)) + "";    }

2017-03-29 17:01:43 440

原创 几种移动控制

transform.Translate(Vector3.forward * Time.deltaTime * force, Space.Self);  朝前transform.Rotate(0, -25 * Time.deltaTime, 0, Space.Self);  转向  坐标转化后前移            double y = GameObject.Find("play...

2017-03-26 13:37:19 1154

转载 Unity3D 获取与设置对象Transform组件下的position,rotation

//获取对象Transform组件下的position  float xx;  float yy;  float zz;  xx = GameObject.Find("objName").GetComponent().position.x;  yy = GameObject.Find("objName").GetComponent().position.y;  zz = G

2017-03-26 10:39:31 1356

原创 rigidbody中Is Kinematic选中后不受force影响

不是是否启用物理运动特性

2017-03-25 22:46:55 1580

空空如也

空空如也

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

TA关注的人

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