Input.GetAxisRaw 与Input.GetAxis
来源:互联网 发布:怎样注册域名 编辑:程序博客网 时间:2024/04/30 14:27
1.
Input.GetAxisRaw 获取原始轴
static function GetAxisRaw (axisName : string) : float
Description描述
Returns the value of the virtual axis identified by axisName with no smoothing filtering applied.
通过坐标轴名称返回一个不使用平滑滤波器的虚拟坐标值。
2.
Input.GetAxis 获取轴
static function GetAxis (axisName : string) : float
Description描述
Returns the value of the virtual axis identified by axisName.
根据坐标轴名称返回虚拟坐标系中的值。
3.
這兩種功能都是用來取得軸向值的
假設我按W前進來移動人物
在沒有按鍵盤的情況下
兩種方法得到的值都是0
兩種方法的極大值跟極小值都是1與-1
如果使用Input.GetAxis
在剛開始按下W的時候取得的值會從0到1慢慢遞增
exp: 0 - 0.123 - 0.245 - 0.672 - 0.89 - 1.0
放開W取得的值會慢慢遞減
這種方法可以產生變化感,有一種加速跟煞車的感覺
如果使用Input.GetAxisRaw
取得的值永遠只有三種 -1,0,1
在按下w的時候取得的值會直接從0變成1
並不會有過渡的數值出來
這種方法因為數值固定,做出來的效果會很穩定
兩種方法都會有用到的時候,端看當時情況而定
- Input.GetAxisRaw 与Input.GetAxis
- Input.GetAxisRaw 与Input.GetAxis
- 【转】Input.GetAxisRaw 与Input.GetAxis的区别
- unity Input.GetAxis和Input.GetAxisRaw
- Unity 方向键输入 Input.GetAxis() 和Input.GetAxisRaw()
- Input.GetAxisRaw与Input.GetKeyDown (KeyCode.LeftArrow)
- Input.GetAxis
- Input.GetAxis();
- Input.GetAxis
- Input.GetAxis
- Input.GetAxis _ Unity3d
- unity Input.GetAxis()函数
- Input.GetAxis()
- Unity3D之float Input.GetAxis(string axisname)
- Unity 3D input.GetAxis用法
- 我的和unity3d的小故事1——恶魔射手之鼠标控制移动之input.getaxis("Horizontal")与input.getaxis("Vertical")
- Unity中Input.GetAxis方法的返回值含义
- unity3d学习j记录之 API阅读-001Input.GetAxis
- 二零零八年七月八日
- 二零零八年七月十五日
- 2009年10月13日
- 2009年10月13日
- Quorum?Quorum!
- Input.GetAxisRaw 与Input.GetAxis
- 2009年10月14日
- Android中图片占用内存的计算
- ASP.NET AJAX客户端编程之旅(四)——以组件的思想开发Ajax应用:客户端组件初探 收藏 在这里添加日志标题
- 工厂三兄弟之工厂方法模式(四)
- ASP.NET AJAX客户端编程之旅(五)——以组件的思想开发Ajax应用:行为、绑定及xml-script
- ASP.NET AJAX(6) - 客户端脚本编程(Sys.WebForms命名空间下的类Sys.Serialization命名空间下的类)
- 系统基础快捷键
- ASP.NET AJAX客户端编程之旅(七)——剩下的问题(完结篇)(1)