我正在使用下面的代码将球移动到确定的点。但是,球正在“传送”到那里,我怎样才能将球滚动到该点?
void Update(){
if (Input.GetMouseButtonDown(0) && EventSystem.current.currentSelectedGameObject != ButtonDiminuir && EventSystem.current.currentSelectedGameObject != ButtonAumentar &&
EventSystem.current.currentSelectedGameObject != BarraForca) {
transform.position = Vector3.Lerp(transform.position, new Vector3(transform.position.x, transform.position.y, -9.0424f), 2 * Time.deltaTime);
Anim.Play("Kick_Up");
}
}
翻过高山走不出你
芜湖不芜
相关分类