Input.GetAxis()
来源:互联网 发布:java类的调用 编辑:程序博客网 时间:2024/05/16 11:47
语法
public static float GetAxis(string axisName);
用法描述
Returns the value of the virtual axis identified by axisName.
- The value will be in the range -1…1 for keyboard and joystick input.
键盘输入&joystick输入
- If the axis is setup to be delta mouse movement, the mouse delta is multiplied by the axis sensitivity and the range is not -1…1.
鼠标输入
This is frame-rate independent; you do not need to be concerned about varying frame-rates when using this value.
与帧率无关
示例代码
using UnityEngine;using System.Collections;public class ExampleClass : MonoBehaviour { public float horizontalSpeed = 2.0F; public float verticalSpeed = 2.0F; void Update() { float h = horizontalSpeed * Input.GetAxis("Mouse X"); float v = verticalSpeed * Input.GetAxis("Mouse Y"); transform.Rotate(v, h, 0); }}
阅读全文
0 0
- Input.GetAxis()
- Input.GetAxis
- Input.GetAxis();
- Input.GetAxis
- Input.GetAxis
- Unity 方向键输入 Input.GetAxis() 和Input.GetAxisRaw()
- Input.GetAxis _ Unity3d
- unity Input.GetAxis()函数
- Input.GetAxisRaw 与Input.GetAxis
- Input.GetAxisRaw 与Input.GetAxis
- unity Input.GetAxis和Input.GetAxisRaw
- Unity3D之float Input.GetAxis(string axisname)
- Unity 3D input.GetAxis用法
- 【转】Input.GetAxisRaw 与Input.GetAxis的区别
- Unity中Input.GetAxis方法的返回值含义
- unity3d学习j记录之 API阅读-001Input.GetAxis
- 我的和unity3d的小故事1——恶魔射手之鼠标控制移动之input.getaxis("Horizontal")与input.getaxis("Vertical")
- 文本框控件(Input)
- [IOS笔记]UITableView及索引条
- Linux 一台服务器部署多个tomcat
- 在sublime text 3中编译javascript
- Refs and the DOM
- leetcode 124. Binary Tree Maximum Path Sum
- Input.GetAxis()
- 基于UVM的verilog验证
- ccf 炉石传说
- 201703-1分蛋糕
- should be described in NUMA config 和 CPU feature cmt not found
- mysql增加,删除,查看唯一索引
- 【bzoj4720】【noip2016】【换座位】期望dp+Floyd
- uiautomator自动化脚本
- python爬取网易云音乐薛之谦歌词数据,生成词云