์๋ ํ์ธ์ ๊ธฐ์ฐจ ๋ง๋ค๊ณ ์์ด์
๊ธฐ์ฐจ ๋ง๋๋๋ฐ ์ค๋ ฅ์ด ๋ธ๋ ค์ ์ง๋๊ฐ ์ ๋๊ฐ๋ค์
๊ณก์ ํ์ ์ด ์ด์ํด์ ์ฐพ์๋ณด๋๊น Bezier ๊ณก์ ์ผ๋ก ํ๋ผ๋๋ผ๊ณ ์... ๊ทธ๋์ ์ธํฐ๋ท์์ ์ฐพ์์ ๋ง๋ค์๋๋ฐ
๋ณด์๋ฉด Bezier Curve์์ points ์ขํ๋ค์ด ์คํฌ๋ฆฝํธ ๋ถ์ ์ค๋ธ์ ํธ์ ์ค์ฌ์ 0,0,0์ด๋ผ๊ณ ๋ถ์ ์ขํ์ธ๋ฐ์ฌ
์ด๊ฑธ ๊ทธ๋ฅ ์ขํ? ์ค๋ธ์ ํธ๊ฐ ์๋๋ผ ํ๋ฉด์์์ย 0,0,0์ ์ค์ฌ์ผ๋ก ์นํํ ์ ์์๊น์..?
์ ๊ฐ์ ๊ฑด๋๋ฆฌ๋ฉด ๊ณก์ ๋ ๋ณํด์ ์ด์ฐ ํ ์ง ๋ชจ๋ฅด๊ฒ ๋ค์ ํฌํ!
1์ค์์ฝ : points[0]์ ์ขํ๋ฅผ ๊ตฌํ๋ ค๊ณ ํจ
์ ์คํฌ๋ฆฝํธ๊ฐ ๋ถ์ transform.position + points[0] ์ด 0์ ์ค์ ์ขํ ์๋๊ฐ?
๋ฒ ์ง์ด ์คํฌ๋ฆฝํธ์์ points[0]์ด ์ transform์ ๋ก์ปฌ ํฌ์ง์ ์์ ์ ๊ฐ๋งํผ ์ฎ๊ฒจ์ง ๊ณณ์ด๋ผ๋ ๋ป ์๋?
์ ๋ฒ ์ง์ด ์ปค๋ธ์คํฌ๋ฆฝํธ๊ฐ ๋ถ์ ์ค๋ธ์ ํธ๊ฐ ์ด๋ค๊ฒ์ ์ฐจ์ผ๋์๋? ๊ทธ๋ผ ๋ถ๋ชจ๋ฃจํธ์ ์์น๊ฐ+์ ๊ฐ์ด ์๋์ขํ 0,0,0์ผ๋ก๋ถํฐ์ ์ขํ์ ธ
๋ง์ฝ์ ์ ์คํฌ๋ฆฝํธ๊ฐ๋ถ์ ์ค๋ธ์ ํธ๊ฐ ๋ฃจํธ๋ผ๋ฉด ์ ๊ฒ ๊ทธ๋ฅ ์๋์ขํ 0,0,0์ผ๋ก๋ถํฐ์ ์ขํ๊ณ
<Transform.position> returns ALWAYS the world position even when it's a nested child.<Transform.localPosition> returns the local position relative to it's parent. If an object doesn't have a parent it's the same as Transform.position.
<Transform.TransformPoint> transforms a local coordinate inside this Transform into world space. <Transform.InverseTransformPoint> transforms a world coordinate into the local space of this Transform.
์ ๊ทธ๋ ๋ค์ ์ ๋ง ๊ฐ์ฌํฉ๋๋ค ๋ค๋ค ๋ ์น์ ํด์
ใ ใ ๊ณ์ ์ด๋์ z์ +10.3์ด ๋์ ๋ญ๊ฐ ํ๋๋ ๋ถ๋ชจ์ ์ขํ์๋ค์ ํ...