목록2023/09 (16)
아카이브

플레이어가 포탈에 충돌할 경우 생성될 위치를 지정한다 Player에 PortalManager 스크립트 추가 using System.Collections; using System.Collections.Generic; using UnityEngine; public class portalManager : MonoBehaviour { public Transform APos; public Transform BPos; private void OnTriggerEnter(Collider col) { if (col.CompareTag("Portal A")) { CharacterController cc = GetComponent(); cc.enabled = false; transform.position = BPos.tra..

임시로 만드는 플레이어라 3D 오브젝트 캡슐로 플레이어 설정 playerMove.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class playerMove : MonoBehaviour { public CharacterController controller; public float speed = 6f; public float gravity = -9.81f; public Transform groundCheck; public float groundDistance = 0.4f; public LayerMask groundMask; public float jumpHeight = 3f; private f..

플레인 오브젝트로 바닥을 깔아주고 포탈 모양을 만들 오브젝트 생성 머티리얼 만들어서 색 입혀줌 복사헤서 Portal B 생성 주황색으로 만듦 포탈에 카메라 붙이기 주황색 포탈은 파란색 포탈 앞 물체가 보이고 파란색 포탈은 주황색 포탈 앞 물체가 보이도록 해야함 물체를 보여줄 포탈 표면 생성 카메라의 Target Display를 ACam BCam 둘 다 Display8로 바꿔줌 렌더러 텍스쳐 A를 만들고 ACam 타겟 텍스쳐에 넣어준다 머티리얼 A View Mat 만들고 알베도에 A 넣어줌 Portal B View 생성 후 A View Mat 부착 캠 조정 위 같은 방법으로 B View Mat 생성 후 Portal A View에 부착
포탈 https://youtu.be/TluRVBhmf8w?si=vcahjyG09bw3WS0L 구현 내용 플레이어 캐릭터 이동 포탈 생성 도구 줍기 2개의 포탈 생성 후 큐브이동 필요한 에셋 플레이어 캐릭터, 손에 들고 있을 도구, 포탈, 배경과 바닥 큐브에 씌울 이미지 참고 Portal Tutorial in Unity - Part 1 - YouTube How were the portals in Portal created? | Bitwise - YouTube How were the portals in Portal Game created? - YouTube Fully Functional Portals in Unity URP - YouTube https://youtu.be/359zcpybgIM?si=F07cw..