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?