Unity简单控制物体移动

xiaoxiao2021-03-01  14

 

public float movespeed=1.0f;

Update(){  float hori = Input.GetAxis("Horizontal");         float vec = Input.GetAxis("Vertical");         transform.Translate(new Vector3(hori,0, vec) * Time.deltaTime * movespeed); }

转载请注明原文地址: https://www.6miu.com/read-4050152.html

最新回复(0)