pc8888888 发表于 2023-2-14 09:27

Unity RectTransform修改rotation

已知起始向量,修改旋转rotation
RectTransform rt = transform.GetComponent<RectTransform>();float y = Vector3.Angle(end - transform.position, Vector3.right);rt.eulerAngles = new Vector3(0, y, 0);
页: [1]
查看完整版本: Unity RectTransform修改rotation