Attachment

Attachment : Instance

Overview

Attachment는 특정 위치와 방향을 정의하는 인스턴스로, 주로 BasePart, Bone, 또는 다른 Attachment에 종속됩니다.

상대적인 위치와 회전은 CFrame 속성을 통해 설정되며, 필요에 따라 WorldCFrame을 사용해 절대 좌표 기준으로 조정할 수도 있습니다.

이 인스턴스는 다양한 기능과 연동되어 단순한 위치 지정 이상의 역할을 수행합니다. 예를 들어, Beam은 두 개의 Attachment 사이를 연결하여 시각적 효과를 구현하며, 물리 관련 인스턴스들도 Attachment가 위치한 지점을 기준으로 동작하게 할 수 있어 보다 정밀한 제어가 가능합니다.

BasePart만으로는 어려운 세부 위치 조정이나 상호작용 지점을 Attachment를 통해 손쉽게 구성할 수 있어, 다양한 효과나 동작의 중심점을 유연하게 설정할 수 있습니다.

Properties

CFrame

CFrame

부모 객체를 기준으로 한 상대적인 위치와 방향의 오프셋을 나타내는 속성입니다.

Code Samples

local Attachment = script.Parent

print(Attachment.CFrame)

WorldCFrame

CFrame

게임 월드를 기준으로 한 절대적인 위치와 방향을 나타내는 속성입니다.

부모 객체의 위치 및 회전에 Attachment의 고유 오프셋이 적용된 결과로 계산됩니다.

Code Samples

local Attachment = script.Parent

print(Attachment.WorldCFrame)

Axis

Vector3

Attachment의 X축 방향을 나타내는 속성입니다.

Code Samples

local Attachment = script.Parent

print(Attachment.Axis)

SecondaryAxis

Vector3

Attachment의 Y축 방향을 나타내는 속성입니다.

Code Samples

local Attachment = script.Parent

print(Attachment.SecondaryAxis)

WorldAxis

Vector3

게임 월드 좌표계를 기준으로 계산된 Attachment의 X축 방향을 나타내는 속성입니다.

Code Samples

local Attachment = script.Parent

print(Attachment.WorldAxis)

WorldSecondaryAxis

Vector3

게임 월드 좌표계를 기준으로 계산된 Attachment의 Y축 방향을 나타내는 속성입니다.

Code Samples

local Attachment = script.Parent

print(Attachment.WorldSecondaryAxis)

Methods

GetConstraints

현재 지원되지 않습니다.

Parameters

Return

array

Code Samples

Events

Last updated