Part

사용되지 않는 항목 표시

*이 콘텐츠는 AI(베타)를 사용해 번역되었으며, 오류가 있을 수 있습니다. 이 페이지를 영어로 보려면 여기를 클릭하세요.

파트 개체는 BasePart의 유형입니다. 5가지 다른 기본 모양으로 제공됩니다: 볼, 블록, 실린더, 쐐기, 그리고 코너 쐐기.

코드 샘플

The script below spawns a new Part instance and sets several of the part's properties.

Most notably, the script sets the Part.Shape property to Enum.PartType.Ball. It also names the part JurassicPart, anchors it, makes it a child of Workspace, and sets its color to white.

Create a Part in a Script

local part = Instance.new("Part")
part.Name = "JurassicPart"
part.Anchored = true
part.Shape = Enum.PartType.Ball
part.Color = Color3.new(1, 1, 1)
part.Parent = workspace -- Put the part into the Workspace

요약

속성

  • 복제되지 않음
    병렬 읽기

    개체의 전체 모양을 설정합니다.

속성BasePart에서 상속되었습니다속성PVInstance에서 상속되었습니다

메서드

메서드BasePart에서 상속되었습니다메서드PVInstance에서 상속되었습니다

이벤트

이벤트BasePart에서 상속되었습니다

속성

복제되지 않음
병렬 읽기

형태 속성은 개체의 전체 모양을 기본 제공 형태 목록 중 하나로 설정합니다.

열거형 Enum.PartType는 모양 값을 제어하고 다섯 가지 가능한 모양을 가집니다:

| 모양/값 | 설명 | | ----------- | --------------------------------------- | | 공 | 구형 모양.| | 블록 | 블록 모양.| | 실린더 | 실린더 모양.| | 쐐기 | 한쪽에 경사가 있는 쐐기 모양.| | 코너 쐐기 | 양쪽에 경사가 있는 쐐기 모양입니다. |

MeshPart솔리드 모델링을 사용하여 완전히 사용자 지정된 부품 모양을 얻을 수 있습니다.

공, 블록, 쐐기, 코너 쐐기 간의 충돌은 정확하지만, 지형, 실린더, TriangleMeshes 및 기타 기하 유형 간의 충돌은 대략적입니다.즉, 공 모양이 자동차 바퀴에 안정적인 충돌 방지 장치를 만드는 데 유용할 수 있음을 의미합니다.

코드 샘플

The script below spawns a new Part instance and sets several of the part's properties.

Most notably, the script sets the Part.Shape property to Enum.PartType.Ball. It also names the part JurassicPart, anchors it, makes it a child of Workspace, and sets its color to white.

Create a Part in a Script

local part = Instance.new("Part")
part.Name = "JurassicPart"
part.Anchored = true
part.Shape = Enum.PartType.Ball
part.Color = Color3.new(1, 1, 1)
part.Parent = workspace -- Put the part into the Workspace

메서드

이벤트