목록전체 글 (16)
그냥한다
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.AI; public class EnemyCtrl : MonoBehaviour{ //플레이어를 향해서 이동하고 남은거리가 2라면 멈춘다 ==> 애니메이션을 idle 상태로. //적 캐릭터가 공격받으면 발생할 이펙트를 저..
12345678910111213141516171819202122232425262728293031323334353637383940414243using System.Collections;using System.Collections.Generic;using UnityEngine;using Valve.VR; public class HandCtrl : MonoBehaviour{ //마우스 왼쪽버튼(왼쪽ctrl)키를 눌렀을 때 총알 발사 //vive의 trigger 버튼 SteamVR_Input_Sources hand; SteamVR_Behaviour_Pose pose; //왼손인가 오른손인가 SteamVR_Action_Boolean trigger = SteamVR_Actions.default_InteractUI;..
1234567891011121314151617181920212223242526272829using System.Collections;using System.Collections.Generic;using UnityEngine; public class BulletCtrl : MonoBehaviour{ //총알이 날아가는 속도를 저장하는 변수 public float BulletSpeed; // Start is called before the first frame update void Start() { Destroy(gameObject, 2.0f); } // Update is called once per frame void Update() { //총알은 매 초 BulletSpeed 수치만큼 날아간다. //Tim..
123456789101112131415161718192021222324252627282930313233343536373839404142using System.Collections;using System.Collections.Generic;using UnityEngine;using Valve.VR; public class PaletteMgr : MonoBehaviour{ //왼손 컨트롤러의 Input Source public SteamVR_Input_Sources lefthand = SteamVR_Input_Sources.LeftHand; //트랙패드의 클릭 여부 public SteamVR_Action_Boolean trackPad = SteamVR_Actions.default_Teleport; //트랙패..
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110using System;using System.Collections;using System.Collections.Generic;using UnityEngine;using Valve.VR; public class DrawMgr : MonoBehaviour{ [Header("Collider")] public Vecto..
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263using System.Collections;using System.Collections.Generic;using UnityEngine;using Valve.VR;using UnityEngine.EventSystems;using Valve.VR.Extras; public class CastEventToUI : MonoBehaviour{ private SteamVR_LaserPointer laserPointer; private void OnEnable() { laserPointer = gameObje..
12345678910111213141516171819202122232425262728293031323334353637383940414243using System.Collections;using System.Collections.Generic;using UnityEngine;using Valve.VR; public class ViveControllerInput : MonoBehaviour{ //입력 소스 정의 public SteamVR_Input_Sources leftHand = SteamVR_Input_Sources.LeftHand; public SteamVR_Input_Sources rightHand = SteamVR_Input_Sources.RightHand; public SteamVR_Input_S..
LaserPointer.cs 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159using System...