Unity中LineRenderer修改朝向face
1.LineRenderer默认是朝向相机的,需要修改朝向Z轴模式2.修改LineRenderer所在物体的Z轴Transform earth = MyPlanet.ins.transform;int midIndex = ptNodes.Count / 2;//取中间点Vector3 direct = ptNodes[midIndex] - earth.position;transform.po
·
1.LineRenderer默认是朝向相机的,需要修改朝向Z轴模式
2.修改LineRenderer所在物体的Z轴
Vector3 direct = ptNodes[0] - MyPlanet.ins.transform.position;
transform.rotation = Quaternion.LookRotation(-direct, MyPlanet.ins.transform.up);
更多推荐
已为社区贡献1条内容
所有评论(0)