-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Document PhysicsServer3D
shapes
#110223
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
base: master
Are you sure you want to change the base?
Document PhysicsServer3D
shapes
#110223
Conversation
doc/classes/PhysicsServer3D.xml
Outdated
- [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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will take a look!
8a5db9e
to
97cf92a
Compare
97cf92a
to
9505c0d
Compare
Consistent with the
PhysicsServer2D
documentation. In particular, documentPhysicsServer3D.shape_set_data
: