赞
踩
eulerAngles Y轴旋转
FPSController.transform.eulerAngles = new Vector3(0, FPSController.transform.localEulerAngles.y, 0);
LookAt 旋转物体的轴向 指向要操作的物体
public GameObject FPSController;
public Transform FPSController_tense;
public void switch_shunyi(GameObject g)
{
FPSController_tense = FPSController.transform;
FPSController.transform.LookAt(g.transform);
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。