|
701 | 701 | <method name="box_shape_create"> |
702 | 702 | <return type="RID" /> |
703 | 703 | <description> |
| 704 | + Creates a 3D box shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the box's half-extents. |
704 | 705 | </description> |
705 | 706 | </method> |
706 | 707 | <method name="capsule_shape_create"> |
707 | 708 | <return type="RID" /> |
708 | 709 | <description> |
| 710 | + Creates a 3D capsule shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the capsule's height and radius. |
709 | 711 | </description> |
710 | 712 | </method> |
711 | 713 | <method name="concave_polygon_shape_create"> |
712 | 714 | <return type="RID" /> |
713 | 715 | <description> |
| 716 | + Creates a 3D concave polygon shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the concave polygon's triangles. |
714 | 717 | </description> |
715 | 718 | </method> |
716 | 719 | <method name="cone_twist_joint_get_param" qualifiers="const"> |
|
733 | 736 | <method name="convex_polygon_shape_create"> |
734 | 737 | <return type="RID" /> |
735 | 738 | <description> |
| 739 | + Creates a 3D convex polygon shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the convex polygon's points. |
736 | 740 | </description> |
737 | 741 | </method> |
738 | 742 | <method name="custom_shape_create"> |
739 | 743 | <return type="RID" /> |
740 | 744 | <description> |
| 745 | + Creates a custom shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the shape's data. |
| 746 | + [b]Note:[/b] Custom shapes are not supported by the built-in physics servers, so calling this method always produces an error when using Godot Physics or Jolt Physics. Custom physics servers implemented as GDExtensions may support a custom shape. |
741 | 747 | </description> |
742 | 748 | </method> |
743 | 749 | <method name="cylinder_shape_create"> |
744 | 750 | <return type="RID" /> |
745 | 751 | <description> |
| 752 | + Creates a 3D cylinder shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the cylinder's height and radius. |
746 | 753 | </description> |
747 | 754 | </method> |
748 | 755 | <method name="free_rid"> |
|
800 | 807 | <method name="heightmap_shape_create"> |
801 | 808 | <return type="RID" /> |
802 | 809 | <description> |
| 810 | + Creates a 3D heightmap shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the heightmap's data. |
803 | 811 | </description> |
804 | 812 | </method> |
805 | 813 | <method name="hinge_joint_get_flag" qualifiers="const"> |
|
985 | 993 | <method name="separation_ray_shape_create"> |
986 | 994 | <return type="RID" /> |
987 | 995 | <description> |
| 996 | + Creates a 3D separation ray shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the shape's [code]length[/code] and [code]slide_on_slope[/code] properties. |
988 | 997 | </description> |
989 | 998 | </method> |
990 | 999 | <method name="set_active"> |
|
998 | 1007 | <return type="Variant" /> |
999 | 1008 | <param index="0" name="shape" type="RID" /> |
1000 | 1009 | <description> |
1001 | | - Returns the shape data. |
| 1010 | + Returns the shape data that configures the shape, such as the half-extents of a box or the triangles of a concave (trimesh) shape. See [method shape_set_data] for the precise format of this data in each case. |
1002 | 1011 | </description> |
1003 | 1012 | </method> |
1004 | 1013 | <method name="shape_get_margin" qualifiers="const"> |
|
1013 | 1022 | <return type="int" enum="PhysicsServer3D.ShapeType" /> |
1014 | 1023 | <param index="0" name="shape" type="RID" /> |
1015 | 1024 | <description> |
1016 | | - Returns the type of shape. |
| 1025 | + Returns the shape's type. |
1017 | 1026 | </description> |
1018 | 1027 | </method> |
1019 | 1028 | <method name="shape_set_data"> |
1020 | 1029 | <return type="void" /> |
1021 | 1030 | <param index="0" name="shape" type="RID" /> |
1022 | 1031 | <param index="1" name="data" type="Variant" /> |
1023 | 1032 | <description> |
1024 | | - Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. |
| 1033 | + Sets the shape data that configures the shape. The [param data] to be passed depends on the shape's type (see [method shape_get_type]): |
| 1034 | + - [constant SHAPE_WORLD_BOUNDARY]: a [Plane], |
| 1035 | + - [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, |
| 1036 | + - [constant SHAPE_SPHERE]: a [float] that is the radius of the sphere, |
| 1037 | + - [constant SHAPE_BOX]: a [Vector3] containing the half-extents of the box, |
| 1038 | + - [constant SHAPE_CAPSULE]: a dictionary containing the keys [code]"height"[/code] and [code]"radius"[/code] with [float] values, |
| 1039 | + - [constant SHAPE_CYLINDER]: a dictionary containing the keys [code]"height"[/code] and [code]"radius"[/code] with [float] values, |
| 1040 | + - [constant SHAPE_CONVEX_POLYGON]: a [PackedVector3Array] of points defining a convex polygon (the shape will be the convex hull of the points), |
| 1041 | + - [constant SHAPE_CONCAVE_POLYGON]: a dictionary containing the key [code]"faces"[/code] with a [PackedVector3Array] value (with a 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, |
| 1042 | + - [constant SHAPE_HEIGHTMAP]: a dictionary containing the keys [code]"width"[/code] and [code]"depth"[/code] with [int] values, and the key [code]"heights"[/code] with a value that is a packed array of [float]s of length [code]width * depth[/code] (that is a [PackedFloat32Array], or a [PackedFloat64Array] if Godot was compiled with the [code]precision=double[/code] option), and optionally the keys [code]"min_height"[/code] and [code]"max_height"[/code] with [float] values, |
| 1043 | + - [constant SHAPE_SOFT_BODY]: the input [param data] is ignored and this method has no effect, |
| 1044 | + - [constant SHAPE_CUSTOM]: the input [param data] is interpreted by a custom physics server, if it supports custom shapes. |
1025 | 1045 | </description> |
1026 | 1046 | </method> |
1027 | 1047 | <method name="shape_set_margin"> |
|
1407 | 1427 | <method name="sphere_shape_create"> |
1408 | 1428 | <return type="RID" /> |
1409 | 1429 | <description> |
| 1430 | + Creates a 3D sphere shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the sphere's radius. |
1410 | 1431 | </description> |
1411 | 1432 | </method> |
1412 | 1433 | <method name="world_boundary_shape_create"> |
1413 | 1434 | <return type="RID" /> |
1414 | 1435 | <description> |
| 1436 | + Creates a 3D world boundary shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the shape's normal direction and distance properties. |
1415 | 1437 | </description> |
1416 | 1438 | </method> |
1417 | 1439 | </methods> |
|
1646 | 1668 | Represents the size of the [enum G6DOFJointAxisFlag] enum. |
1647 | 1669 | </constant> |
1648 | 1670 | <constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType"> |
1649 | | - The [Shape3D] is a [WorldBoundaryShape3D]. |
| 1671 | + Constant for creating a world boundary shape (used by the [WorldBoundaryShape3D] resource). |
1650 | 1672 | </constant> |
1651 | 1673 | <constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType"> |
1652 | | - The [Shape3D] is a [SeparationRayShape3D]. |
| 1674 | + Constant for creating a separation ray shape (used by the [SeparationRayShape3D] resource). |
1653 | 1675 | </constant> |
1654 | 1676 | <constant name="SHAPE_SPHERE" value="2" enum="ShapeType"> |
1655 | | - The [Shape3D] is a [SphereShape3D]. |
| 1677 | + Constant for creating a sphere shape (used by the [SphereShape3D] resource). |
1656 | 1678 | </constant> |
1657 | 1679 | <constant name="SHAPE_BOX" value="3" enum="ShapeType"> |
1658 | | - The [Shape3D] is a [BoxShape3D]. |
| 1680 | + Constant for creating a box shape (used by the [BoxShape3D] resource). |
1659 | 1681 | </constant> |
1660 | 1682 | <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType"> |
1661 | | - The [Shape3D] is a [CapsuleShape3D]. |
| 1683 | + Constant for creating a capsule shape (used by the [CapsuleShape3D] resource). |
1662 | 1684 | </constant> |
1663 | 1685 | <constant name="SHAPE_CYLINDER" value="5" enum="ShapeType"> |
1664 | | - The [Shape3D] is a [CylinderShape3D]. |
| 1686 | + Constant for creating a cylinder shape (used by the [CylinderShape3D] resource). |
1665 | 1687 | </constant> |
1666 | 1688 | <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType"> |
1667 | | - The [Shape3D] is a [ConvexPolygonShape3D]. |
| 1689 | + Constant for creating a convex polygon shape (used by the [ConvexPolygonShape3D] resource). |
1668 | 1690 | </constant> |
1669 | 1691 | <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType"> |
1670 | | - The [Shape3D] is a [ConcavePolygonShape3D]. |
| 1692 | + Constant for creating a concave polygon (trimesh) shape (used by the [ConcavePolygonShape3D] resource). |
1671 | 1693 | </constant> |
1672 | 1694 | <constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType"> |
1673 | | - The [Shape3D] is a [HeightMapShape3D]. |
| 1695 | + Constant for creating a heightmap shape (used by the [HeightMapShape3D] resource). |
1674 | 1696 | </constant> |
1675 | 1697 | <constant name="SHAPE_SOFT_BODY" value="9" enum="ShapeType"> |
1676 | | - The [Shape3D] is used internally for a soft body. Any attempt to create this kind of shape results in an error. |
| 1698 | + Constant used internally for a soft body shape. Any attempt to create this kind of shape results in an error. |
1677 | 1699 | </constant> |
1678 | 1700 | <constant name="SHAPE_CUSTOM" value="10" enum="ShapeType"> |
1679 | | - This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. |
| 1701 | + Constant used internally for a custom shape. Any attempt to create this kind of shape results in an error when using Godot Physics or Jolt Physics. |
1680 | 1702 | </constant> |
1681 | 1703 | <constant name="AREA_PARAM_GRAVITY_OVERRIDE_MODE" value="0" enum="AreaParameter"> |
1682 | 1704 | Constant to set/get gravity override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. |
|
0 commit comments