DOOR

    Unity 3D 문 열기/닫기

    Unity 3D 문 열기/닫기

    Unity 3D 문열기/닫기 소스 using System.Collections; using System.Collections.Generic; using UnityEngine; public class DoorScript : MonoBehaviour { public bool open = false; public float doorOpenAngle = 90f; public float doorCloseAngle = 0f; public float smoot = 2f; void Start() { } public void ChangeDoorState() { open = !open; } void Update() { if (open) { Quaternion targetRotation = Quaternion.Euler(0..