์ค๋ธ์ ํธA์ y๊ฐ๋๋ฅผ ์ค๋ธ์ ํธB์ y๊ฐ๋์ ๋ฃ๊ณ ์ถ์
B.transform.localRotation.y = A.transform.localRotation.y;
B.transform.eulerAngles.y =ย A.transform.eulerAngles.y;
B.transform.rotation.y=ย A.transform.rotation.y;
์ด๊ฑฐ ๋ค ์๋...
x๊ฐ๋๋ ๋ค๋ฅธ๋ฐ y๊ฐ๋๋ง ๊ฐ๊ฒ ํ ์๋ ์๋์..
FixedUpdated์ ๋ค์ด๊ฐ๊ฑฐ์..
transform.rotation = Quaternion.Euler(transform.rotation.x, target.transform.rotation.y, transform.rotation.z);
๊ทธ๋ ๊ฒ ํ๋ฉด x๊ฐ์ ๋ณ๊ฒฝํ ๋ ์ ์ฉ์ด ์๋์.. ๊ทธ๋ฅ A์ค๋ธ์ ํธ์ y๊ฐ์ ๋ฐ๊ฟ์ค๋ ๊ฐ์ด x๊ฐ์ ๋ฐ๊ฟ์คฌ์ด.. space.world์ด์ฉํด์
transform.rotation = Quaternion.Euler(transform.rotation.x, target.transform.rotation.y, transform.rotation.z);
Vector3 temp = new Vector3(B.eulerAngle.x,A.eulerAngle.y,B.eulerAngle.z); B.transform.rotation = Quaternion.Euler(temp)
๊ทธ๋ฅ A์ค๋ธ์ ํธ์ y๊ฐ์ ๋ฐ๊ฟ์ค๋ ๊ฐ์ด x๊ฐ์ ๋ฐ๊ฟ์คฌ์ด.. space.world์ด์ฉํด์ x๊ฐ ์๊ด์์ด ๋๊ฐ์ด ๋ณ๊ฒฝ๋๊ฒ..