var cam : Transform;
var cameraRelativeRight : Vector3;
// Apply a force relative to the camera's x-axis
function Update()
{
   cameraRelativeRight = cam.TransformDirection (Vector3.right);
   cameraRelativeRight.y = 0;
   transform.rotation = Quaternion.RotateTowards (transform.rotation, Quaternion.LookRotation(cameraRelativeRight), 5);
}

相关文章:

  • 2021-11-06
  • 2021-07-28
  • 2022-12-23
  • 2021-09-16
  • 2021-10-06
猜你喜欢
  • 2022-01-06
  • 2022-01-18
  • 2021-07-18
  • 2021-09-09
相关资源
相似解决方案