HitResult
HitResult
์์ฑ
local startPos = Workspace.Cube.Transform.Location
local dir = Vector.new(1, 0, 0)
local distance = 1000
local targetList = Game:LineTraceList(startPos, dir, distance) --์์ ์์น์์ ์ง์ ๋ฐฉํฅ์ ๊ฑฐ๋ฆฌ์ ์ถฉ๋์ฒด๊ฐ ์์ผ๋ฉด ์ถฉ๋ ์ ๋ณด ๋ฆฌ์คํธ๋ฅผ ๋ฐํํด์.
for i = 1, #targetList do
print(targetList[i].HitObject.Name) --์ถฉ๋ํ ์ค๋ธ์ ํธ์์.
print(targetList[i].HitLocation) --์ถฉ๋ํ ์ค๋ธ์ ํธ์ ์์น์์.
end์ฌ์ฉ ๊ฐ๋ฅํ ๋ถ๋ชจ ์ค๋ธ์ ํธ ๊ธฐ๋ฅ๋ค
์์ฑ
์ด๋ฒคํธ
ํจ์
Last updated
Was this helpful?