Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add detailed documentation for Part.Shape #900

Merged
merged 4 commits into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions content/en-us/reference/engine/classes/Part.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,20 @@ properties:
The `Enum.PartType` enum controls the shape value, and has five possible
shapes:

| Shape/Value | Description |
| ----------- | --------------------------------------- |
| Ball | A spherical shape, like a basketball. |
| Cylinder | A rod-like shape, like a tin can. |
| Block | The default, brick shape. |
| Wedge | A wedge shape with a slope on one side. |
| CornerWedge | A wedge shape with slopes on two sides. |
| Shape/Value | Description |
| ----------- | ------------------------------------------- |
| Ball | A spherical shape. |
| Block | A block shape. |
| Cylinder | A cylinder shape. |
| Wedge | A wedge shape with a slope on one side. |
| CornerWedge | A wedge shape with slopes on two sides. |

Note that `Class.MeshPart` and
`Class.MeshPart` and
[solid modeling](../../../parts/solid-modeling.md) can be used to obtain
completely custom part shapes.

Collisions between balls, blocks, and wedges, and corner wedges are exact, whereas collisions between terrain, cylinders, TriangleMeshes, and other geometry types are approximations.
This means that the ball shape can be useful to create stable colliders for car wheels.
code_samples:
- using-a-script-to-create-a-part
type: PartType
Expand Down
Loading