private Rigidbody rb1;
void Start () {
//1.获取刚体
rb1 = GetComponent<Rigidbody>();
//2.添加一个力(y方向100点的力)
rb1.AddForce(new Vector3(0, 100, 0));
}
002.unity刚体
最新推荐文章于 2022-09-17 17:50:03 发布
private Rigidbody rb1;
void Start () {
//1.获取刚体
rb1 = GetComponent<Rigidbody>();
//2.添加一个力(y方向100点的力)
rb1.AddForce(new Vector3(0, 100, 0));
}