📜  unity normalize 运动 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:10.800000             🧑  作者: Mango

代码示例1
//Normalizing the Input Vector and afterwards adding speed if needed!
 
 float h = Input.GetAxis("Horizontal");
 float v = Input.GetAxis("Vertical");
 Vector3 inputVector = new Vector2( h, 0, v );
 inputVector.Normalize();