Unity2D对象移动的几种方法

1.改变对象速度spa rb = GetComponent<Rigidbody2D>(); if (Input.GetKey(KeyCode.LeftArrow)) { rb.velocity = new Vector2(-movespeed, rb.velocity.y); } if (Input.GetKey(KeyCode.RightArrow)) { rb.velocity = new
相关文章
相关标签/搜索