Matrix
Matrix ๊ฐ์ฒด์ ์์น ํ์ ๊ฐ์ ์ป๊ฑฐ๋ ๋ณ๊ฒฝ ํ ์ ์์ด์.
์์ฑ
Location
Matrix์ ์์น ๊ฐ
-- ์ํ --
local Cube = Workspace.Cube
local CubeTransform = Cube.Transform
print(CubeTransform.Location)
wait(2)
CubeTransform.Location = Vector.new(300, 0, 100)
Cube.Transform = CubeTransform
Rotation
Matrix์ ํ์ ๊ฐ
-- ์ํ --
ScaleXYZ
Matrix์ ํฌ๊ธฐ ๊ฐ
-- ์ํ --
์์ฑ์
Matrix new()
Matrix ๋ฅผ ์์ฑํด์.
ํจ์
void AddLocation(number x, number y, number z)
์ฃผ์ด์ง ๊ฐ์ผ๋ก ๊ธฐ์กด ์์น์ +๋ก ๊ณ์ฐํด์ ์์น๋ฅผ ์ค์ ํด์. (๋ํ๊ธฐ ํ X ๊ฐ, ๋ํ๊ธฐ ํ Y ๊ฐ, ๋ํ๊ธฐ ํ Z ๊ฐ)
-- ์ํ --
void AddLocation(Vector Location)
์ฃผ์ด์ง Vector๋ก ๊ธฐ์กด ์์น์ +๋ก ๊ณ์ฐํด์ ์์น๋ฅผ ์ค์ ํด์. (๋ํ๊ธฐ ํ Vector ๊ฐ)
-- ์ํ --
void AddRotation(Vector rotation)
์ฃผ์ด์ง ๊ฐ์ผ๋ก ๊ธฐ์กด ๊ฐ๋์ +๋ก ๊ณ์ฐํด์ ๊ฐ๋๋ฅผ ์ค์ ํด์. (๋ํ๊ธฐ Vector ๊ฐ)
-- ์ํ --
void AddRotation(number x, number y, number z)
์ฃผ์ด์ง ๊ฐ์ผ๋ก ๊ธฐ์กด ๊ฐ๋์ +๋ก ๊ณ์ฐํด์ ๊ฐ๋๋ฅผ ์ค์ ํด์. (๋ํ๊ธฐ ํ X ๊ฐ, ๋ํ๊ธฐ ํ Y ๊ฐ, ๋ํ๊ธฐ ํ Z ๊ฐ)
-- ์ํ --
Vector GetForward()
๊ฐ์ฒด๊ฐ ๋ฐ๋ผ๋ณด๊ณ ์๋ ๋ฐฉํฅ Vector์ ์ป์ ์ ์์ด์.
-- ์ํ --
Vector GetRight()
๊ฐ์ฒด๊ฐ ๋ฐ๋ผ๋ณด๊ณ ์๋ ๋ฐฉํฅ์ ์ค๋ฅธ์ชฝ ๋ฐฉํฅ Vector๋ฅผ ์ป์ ์ ์์ด์.
-- ์ํ --
Vector GetTop()
๊ฐ์ฒด์ ์์ธก ๋ฐฉํฅ Vector๋ฅผ ์ป์ ์ ์์ด์.
-- ์ํ --
void LookAt(Vector TargetPostion, Vector UpVector)
ํน์ ์์น๋ฅผ ๋ฐ๋ผ๋ณด๊ฒ ๋ณ๊ฒฝํด์.
-- ์ํ --
Last updated
Was this helpful?