unity Input.GetAxis和Input.GetAxisRaw

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

 

posted on 2015-03-29 20:21  wantnon  阅读(1786)  评论(0编辑  收藏  举报

导航