我想用与玩家推动物体刚体相同的力拉动物体。但是,我不知道如何使这样的力量等于走进刚体的力量。 这里是我的代码: //if can push and holds button for pushing
other.GetComponent<Rigidbody>().AddForce(new Vector3(player.moveInput.x*player.speed*mass, player.mo
Im在屏幕外产生一个对象,我想将它发送到中间。 DrawLine显示目标方向是正确的。但是,这个物体会以任何随机的方向出现。我的计算有什么问题? // add force towards center of screen
var targetPosition = new Vector3(Random.Range(-3, 3), Random.Range(-3, 3),00);