2D刚体移动
Rigidbody2D r = gameObject.GetComponent<Rigidbody2D>();
r.MovePosition(Vector2.Lerp(this.transform.position, Pos, speed * Time.deltaTime));

2D刚体的移动,一般刚体的运算都是放在FixedUpdate中的。


首页 我的博客
粤ICP备17103704号