currentRotation = Vector3.SmoothDamp(currentRotation, new Vector3(pitch, yaw), ref rotationSmoothVelocity, rotationSmoothTime);
rotationSmoothVelocity๋ย Vector3 ํ์์
๋๋ค
์ธํฐ๋ท์ณ๋ ์ ๋ชจ๋ฅด๊ฒ ๋ค์
currentRotation = Vector3.SmoothDamp(currentRotation, new Vector3(pitch, yaw), ref rotationSmoothVelocity, rotationSmoothTime);
rotationSmoothVelocity๋ย Vector3 ํ์์
๋๋ค
์ธํฐ๋ท์ณ๋ ์ ๋ชจ๋ฅด๊ฒ ๋ค์
Vector3๋ ๊ตฌ์กฐ์ฒด ํ์์ด๋ผ ์ธ์๋ก ๋๊ฒจ์ฃผ๋ฉด ๊ฐ๋ณต์ฌ๊ฐ ์ผ์ด๋์ ์๋ ๋ณ์์ ์ํฅ์ ์๋ฏธ์นจ ๊ทผ๋ฐ Refํค์๋๋ฅผ ์ฌ์ฉํ๋ฉด ๋ ํผ๋ฐ์ค๋ฅผ ๋๊ฒจ์ค์ ์๋ ๋ณ์์ ์ํฅ์ ๋ฏธ์นจ
๊ทธ๋ ๊ตฐ์.. ๊ทผ๋ฐ ๊ตณ์ด ์๋ ๋ณ์์ ์ํฅ์ ๋ฏธ์น๊ฒ ํ๋ ค๋ ์ด์ ๋ฅผ ๋ชจ๋ฅด๊ฒ ๋ค์ฌ
์ฝ๋ฐ์ด๋ ํผ๋ฐ์ค
์๋งคํ์ผ๋ก out๋ ์์๋๋ค
์ธ์๋ก ๋๊ธฐ๋ฉด ๊ฐ ๋ณต์ฌ๊ฐ ์ผ์ด๋๋๋ฐ, ์ด๋ struct๊ฐ ์๋์ ์ผ๋ก ํฌ๊ฑฐ๋ ๊ทธ ํจ์์ ํธ์ถ์ด ๋น๋ฒํ๋ค๋ฉด ์๋์ ํ๊ฐ ์ผ์ด๋ ์๋ ์์ง.
์ด๊ฑฐ์ธ๋ฏ
์ด๊ฑฐ์ธ๊ฒ ์๋๋ผ ๋ณํ๋ velocity๋ฅผ ๋ค์ ์คํญ์์ ๋ ์ฌ์ฉํด์ผํ๊ธฐ ๋๋ฌธ์ ref๋ฅผ ์ฐ๋๊ฑฐ์ผ
๋ณธ๋ฌธ์ ์๋ณด๊ณ ๋๊ธ์ ๋ฌ์์ ๋ค๋ฅธ ์ผ์ด์ค๋ก ์ค๋ช ํ๋ค. ์ด์จ๋ ์ด๊ฒ๋ ref ์ฌ์ฉํ๋ ์ด์ ์ค์ ํ๋๋๊น ์์ ๋๋๊ฒ ์ข์.
๊ฐ์ ๋ณต์ฌํ๋ฉด ์๋๋๊ฒฝ์ฐ - dc App