private void Start() { controls = GetComponent <Controls>(); playerController = GetComponent <PlayerController3D>(); playerHealth = GetComponent <Health>(); cursorController = GetComponent <CursorController>(); }
void Start() { player = FindObjectOfType <PlayerController3D>(); tilt = transform.Find("Tilt"); mainCam = Camera.main; player.cameraController = this; transform.position = player.transform.position + Vector3.up * cameraHeight; transform.rotation = player.transform.rotation; tilt.eulerAngles = new Vector3(currentTilt, transform.eulerAngles.y, transform.eulerAngles.z); mainCam.transform.position += tilt.forward * -currentDistance; CameraClipInfo(); }
public bool HandleRaycast(PlayerController3D controller) { return(true); }