📅  最后修改于: 2022-03-11 14:49:23.695000             🧑  作者: Mango
mousePosition = Input.mousePosition;
mousePosition.z = Mathf.Abs(cam.position.z - ball.position.z);
mousePosition = Camera.main.ScreenToWorldPoint(mousePosition);
dir = mousePosition - object.position;
ball.AddForce ((dir).normalized * force);