Skip to content

Conversation

rburing
Copy link
Member

@rburing rburing commented Sep 3, 2025

Comment on lines 1034 to 1044
- [constant SHAPE_WORLD_BOUNDARY]: a [Plane] [code]plane[/code],
- [constant SHAPE_SEPARATION_RAY]: a dictionary containing the key [code]length[/code] with a [float] value and the key [code]slide_on_slope[/code] with a [bool] value,
- [constant SHAPE_SPHERE]: a [float] [code]radius[/code],
- [constant SHAPE_BOX]: a [Vector3] [code]half_extents[/code],
- [constant SHAPE_CAPSULE]: a dictionary containing the keys [code]height[/code] and [code]radius[/code] with [float] values,
- [constant SHAPE_CYLINDER]: a dictionary containing the keys [code]height[/code] and [code]radius[/code] with [float] values,
- [constant SHAPE_CONVEX_POLYGON]: a [PackedVector3Array] of points defining a convex polygon (the shape will be the convex hull of the points),
- [constant SHAPE_CONCAVE_POLYGON]: a dictionary containing the key [code]faces[/code] with a [PackedVector3Array] value (of length divisible by 3, so that each 3-tuple of points forms a face) and the key [code]backface_collision[/code] with a [bool] value,
- [constant SHAPE_HEIGHTMAP]: a dictionary containing the keys [code]width[/code] and [code]height[/code] with [float] values, and the key [code]heights[/code] with a [PackedFloat32Array] value (or a [PackedFloat64Array] value if Godot was compiled with the [code]precision=double[/code] option) of size [code]width * height[/code] or a float [Image] value of size [code]width × height[/code] (with format [constant Image.FORMAT_RF]), and optionally the keys [code]min_height[/code] and [code]max_height[/code] with [float] values,
- [constant SHAPE_SOFT_BODY]: the input [param data] is ignored and this method has no effect,
- [constant SHAPE_CUSTOM]: the input [param data] is interpreted by the custom physics server, if it supports a custom shape.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These descriptions are all a bit cumbersome, I'll see if I can make some suggestions for improving the readability

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions are welcome, but note this is already a big improvement over the zero information content that was there previously.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely, but I find it very difficult to parse the information in this and especially getting a good overview of what it says

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I improved the phrasing of what used to be the worst parts (and fixed some typos). Also, the layout of the information is consistent with the PhysicsServer2D documentation, so if we want to improve that then I think it should be done as a follow-up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will take a look!

@rburing rburing force-pushed the physicsserver3d_shape_doc branch 5 times, most recently from 8a5db9e to 97cf92a Compare September 3, 2025 13:18
@rburing rburing force-pushed the physicsserver3d_shape_doc branch from 97cf92a to 9505c0d Compare September 3, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PhysicsServer3D.ShapeSetData outputs errors for lacking faces even when the mesh does have them
2 participants