unity Input.GetAxis和Input.GetAxisRaw

时间:2015-03-29 20:49:00   收藏:0   阅读:1403

float h = Input.GetAxis("Horizontal") ;//h range from -1 to 1

float v = Input.GetAxis("Vertical") ;//v range from -1 to 1

 

float h = Input.GetAxisRaw("Horizontal") ;//h is -1, 0, or 1

float v = Input.GetAxisRaw("Vertical") ;//v is -1, 0, or 1

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!