Unity/unity c# MyCode

    Raycast ์ด์šฉํ•˜์—ฌ ํด๋ฆญํ•œ ์ง€์ ์œผ๋กœ ์ด๋™ํ•˜๊ธฐ

    VR๊ฐœ๋ฐœ์„ ํ•˜๋˜ ๋„์ค‘ ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ์›€์ง์ด์ง€ ์•Š๊ณ ๋„ ํด๋ฆญํ•œ ์ง€์ ์œผ๋กœ ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์ด๋™ํ•ด์ฃผ๊ธฐ ์œ„ํ•œ ๋ฐœ์ƒ์„ ์—ฐ๊ตฌํ•˜๋‹ค๊ฐ€ ์ง  ์ฝ”๋“œ์˜€์ง€๋งŒ ์‹ค์ œ๋กœ ์‚ฌ์šฉํ•˜์ง€๋Š” ์•Š์•˜๋‹ค. (1) ํ…Œ์ด๋ธ”, ๊ฒŒ์‹œํŒ ๋“ฑ์˜ ์ด๋™ ์œ„์น˜๊ฐ€ ์ถ”๊ฐ€๋  ๊ฒฝ์šฐ๋ฅผ ์ƒ๊ฐํ•˜์—ฌ ๋ฐฐ์—ด๋กœ ๋งŒ๋“ค์–ด์ฃผ๋ฉด ํ™•์žฅ์„ฑ ์ธก๋ฉด์—์„œ ๋”์šฑ ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค. (2) ์—…๋ฐ์ดํŠธ๋ฌธ ์•ˆ์˜ if๋ฌธ ์•ˆ์— ์žˆ๋Š” ๋กœ์ง์„ ๋‹ค๋ฅธ ํ•จ์ˆ˜๋กœ ๋ถ„๋ฆฌ(๋…๋ฆฝ)์‹œํ‚ค๋Š” ๊ฒƒ์ด ์žฅ๊ธฐ์ ์ธ ์œ ์ง€๋ณด์ˆ˜์— ๋”์šฑ ์ข‹์„ ๊ฒƒ ๊ฐ™๋‹ค. using System.Collections; using System.Collections.Generic; using UnityEngine; public class tempPlayer : MonoBehaviour { public GameObject head;//ํ”Œ๋ ˆ์ด์–ด public GameObject tablePos..