AngularVelocity

AngularVelocity : Constraint

Overview

๊ฐ์ฒด๋ฅผ ์ผ์ •ํ•œ ๊ฐ์†๋„๋กœ ํšŒ์ „์‹œํ‚ค๊ธฐ ์œ„ํ•œ ๋ฌผ๋ฆฌ ์ œ์•ฝ(Constraint) ์ธ์Šคํ„ด์Šค์ž…๋‹ˆ๋‹ค.

RelativeTo ์†์„ฑ์„ World ๋˜๋Š” Attachment ์ค‘ ์–ด๋””๋กœ ์„ค์ •ํ•˜๋А๋ƒ์— ๋”ฐ๋ผ, ๊ฐ์†๋„๊ฐ€ ์ ์šฉ๋˜๋Š” ๊ธฐ์ค€์ด ๋‹ฌ๋ผ์ง‘๋‹ˆ๋‹ค.

Properties

AngularVelocity

Vector3

๊ฐ์†๋„๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Code Samples

local Part = script.Parent
local Attachment = Part.Attachment

local AngularVelocity = Instance.new("AngularVelocity")
AngularVelocity.Attachment0 = Attachment
AngularVelocity.AngularVelocity = Vector3.new(0, 10, 0) 
AngularVelocity.MaxTorque = 1000
AngularVelocity.RelativeTo = Enum.ActuatorRelativeTo.World
AngularVelocity.Parent = Part

MaxTorque

number

ํšŒ์ „ ์šด๋™ ์‹œ ํ—ˆ์šฉ๋˜๋Š” ์ตœ๋Œ€ ํ† ํฌ(ํšŒ์ „๋ ฅ)๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Code Samples

local AngularVelocity = script.Parent

AngularVelocity.MaxTorque = 10

ReactionTorqueEnabled

bool

๊ฐ์†๋„๊ฐ€ ์ ์šฉ๋  ๋•Œ, ๊ทธ์— ๋Œ€ํ•œ ๋ฐ˜์ž‘์šฉ ํ† ํฌ๋ฅผ ํ•จ๊ป˜ ์ ์šฉํ• ์ง€ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด ์†์„ฑ์€ RelativeTo ์†์„ฑ์ด Attachment1์œผ๋กœ ์„ค์ •๋˜์—ˆ์„ ๋•Œ๋งŒ ๋™์ž‘ํ•˜๋ฉฐ, ์†์„ฑ์„ ํ™œ์„ฑํ™”ํ•˜๋ฉด ์—ฐ๊ฒฐ๋œ ๋‘ ํŒŒํŠธ์— ๊ฐ™์€ ํฌ๊ธฐ์ด๋ฉด์„œ ๋ฐ˜๋Œ€ ๋ฐฉํ–ฅ์˜ ํšŒ์ „๋ ฅ(ํ† ํฌ)์„ ์ ์šฉํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

Code Samples

RelativeTo

Enum.ActuatorRelativeTo

ํž˜์ด ์ ์šฉ๋˜๋Š” ๊ธฐ์ค€ ์ขŒํ‘œ๊ณ„๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • World: ๊ฐ์†๋„ ๋ฒกํ„ฐ๊ฐ€ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.

  • Attachment0: Attachment0์˜ CFrame์„ ๊ธฐ์ค€์œผ๋กœ ๊ฐ์†๋„ ๋ฒกํ„ฐ๊ฐ€ ๋ณ€ํ™˜๋˜์–ด ์ ์šฉ๋ฉ๋‹ˆ๋‹ค. (๋น„๊ถŒ์žฅ)

  • Attachment1: Attachment1์˜ CFrame์„ ๊ธฐ์ค€์œผ๋กœ ๊ฐ์†๋„ ๋ฒกํ„ฐ๊ฐ€ ๋ณ€ํ™˜๋˜์–ด ์ ์šฉ๋ฉ๋‹ˆ๋‹ค.

RelativeTo๋ฅผ Attachment0์œผ๋กœ ์„ค์ •ํ•  ์ˆ˜๋Š” ์žˆ์ง€๋งŒ, ์ด ๊ฒฝ์šฐ ๋น„์ •์ƒ์ ์ธ ๋ฌผ๋ฆฌ ๋™์ž‘์ด ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” AngularVelocity ์ œ์•ฝ์ด ๊ธฐ๋ณธ์ ์œผ๋กœ Attachment1์— ํšŒ์ „๋ ฅ์„ ์ ์šฉํ•˜๋„๋ก ์„ค๊ณ„๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.

Attachment0์„ ๊ธฐ์ค€์œผ๋กœ ํšŒ์ „ ๋ฐฉํ–ฅ์„ ๊ณ„์‚ฐํ•˜๋ฉด ๊ธฐ์ค€์ ๊ณผ ํž˜์˜ ์ ์šฉ ๋Œ€์ƒ์ด ๋’ค๋ฐ”๋€Œ์–ด, ์˜ˆ์ƒ์น˜ ๋ชปํ•œ ํšŒ์ „ ๋ฐฉํ–ฅ, ๋ถˆ์•ˆ์ •ํ•œ ์›€์ง์ž„, ๋˜๋Š” ์ถฉ๋Œ๊ณผ ๊ฐ™์€ ๋ฌผ๋ฆฌ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Code Samples

local AngularVelocity = script.Parent

AngularVelocity.RelativeTo = Enum.ActuatorRelativeTo.World

Methods

Events

See also

๋ฌผ๋ฆฌ

Last updated