[unity] raycast 사용하기
·
게임 개발
using System.Collections; using System.Collections.Generic; using UnityEngine; public class RayInteraction : MonoBehaviour { private Camera playerCam; public float distance = 100f; public LayerMask whatIsTarget; private Transform moveTarget; private float targetDistance; // Start is called before the first frame update void Start() { playerCam = Camera.main; } // Update is called once per frame ..