diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/PhysicsServer2D.xml | 21 | ||||
-rw-r--r-- | doc/classes/PhysicsServer3D.xml | 26 | ||||
-rw-r--r-- | doc/classes/RayShape2D.xml | 23 | ||||
-rw-r--r-- | doc/classes/RayShape3D.xml | 23 |
4 files changed, 77 insertions, 16 deletions
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 1df2fd0158..ae6b5fda51 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -716,6 +716,11 @@ Sets a joint parameter. See [enum JointParam] for a list of available parameters. </description> </method> + <method name="ray_shape_create"> + <return type="RID" /> + <description> + </description> + </method> <method name="rectangle_shape_create"> <return type="RID" /> <description> @@ -840,25 +845,27 @@ <constant name="SHAPE_WORLD_MARGIN" value="0" enum="ShapeType"> This is the constant for creating world margin shapes. A world margin shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks. </constant> - <constant name="SHAPE_SEGMENT" value="1" enum="ShapeType"> + <constant name="SHAPE_RAY" value="1" enum="ShapeType"> + </constant> + <constant name="SHAPE_SEGMENT" value="2" enum="ShapeType"> This is the constant for creating segment shapes. A segment shape is a [i]finite[/i] line from a point A to a point B. It can be checked for intersections. </constant> - <constant name="SHAPE_CIRCLE" value="2" enum="ShapeType"> + <constant name="SHAPE_CIRCLE" value="3" enum="ShapeType"> This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. </constant> - <constant name="SHAPE_RECTANGLE" value="3" enum="ShapeType"> + <constant name="SHAPE_RECTANGLE" value="4" enum="ShapeType"> This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. </constant> - <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType"> + <constant name="SHAPE_CAPSULE" value="5" enum="ShapeType"> This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. </constant> - <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType"> + <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType"> This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the [member CollisionPolygon2D.polygon] property, polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon. </constant> - <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType"> + <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType"> This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. </constant> - <constant name="SHAPE_CUSTOM" value="7" enum="ShapeType"> + <constant name="SHAPE_CUSTOM" value="8" enum="ShapeType"> This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. </constant> <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter"> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 33eb0de698..a5234e90e7 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -849,6 +849,11 @@ <description> </description> </method> + <method name="ray_shape_create"> + <return type="RID" /> + <description> + </description> + </method> <method name="set_active"> <return type="void" /> <argument index="0" name="active" type="bool" /> @@ -1171,31 +1176,34 @@ <constant name="SHAPE_PLANE" value="0" enum="ShapeType"> The [Shape3D] is a [WorldMarginShape3D]. </constant> - <constant name="SHAPE_SPHERE" value="1" enum="ShapeType"> + <constant name="SHAPE_RAY" value="1" enum="ShapeType"> + The [Shape3D] is a [RayShape3D]. + </constant> + <constant name="SHAPE_SPHERE" value="2" enum="ShapeType"> The [Shape3D] is a [SphereShape3D]. </constant> - <constant name="SHAPE_BOX" value="2" enum="ShapeType"> + <constant name="SHAPE_BOX" value="3" enum="ShapeType"> The [Shape3D] is a [BoxShape3D]. </constant> - <constant name="SHAPE_CAPSULE" value="3" enum="ShapeType"> + <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType"> The [Shape3D] is a [CapsuleShape3D]. </constant> - <constant name="SHAPE_CYLINDER" value="4" enum="ShapeType"> + <constant name="SHAPE_CYLINDER" value="5" enum="ShapeType"> The [Shape3D] is a [CylinderShape3D]. </constant> - <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType"> + <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType"> The [Shape3D] is a [ConvexPolygonShape3D]. </constant> - <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType"> + <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType"> The [Shape3D] is a [ConcavePolygonShape3D]. </constant> - <constant name="SHAPE_HEIGHTMAP" value="7" enum="ShapeType"> + <constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType"> The [Shape3D] is a [HeightMapShape3D]. </constant> - <constant name="SHAPE_SOFT_BODY" value="8" enum="ShapeType"> + <constant name="SHAPE_SOFT_BODY" value="9" enum="ShapeType"> The [Shape3D] is a [SoftBody3D]. </constant> - <constant name="SHAPE_CUSTOM" value="9" enum="ShapeType"> + <constant name="SHAPE_CUSTOM" value="10" enum="ShapeType"> This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. </constant> <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter"> diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml new file mode 100644 index 0000000000..432c650074 --- /dev/null +++ b/doc/classes/RayShape2D.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="RayShape2D" inherits="Shape2D" version="4.0"> + <brief_description> + Ray shape for 2D collisions. + </brief_description> + <description> + Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="length" type="float" setter="set_length" getter="get_length" default="20.0"> + The ray's length. + </member> + <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope" default="false"> + If [code]true[/code], allow the shape to return the correct normal. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/RayShape3D.xml b/doc/classes/RayShape3D.xml new file mode 100644 index 0000000000..9839044c30 --- /dev/null +++ b/doc/classes/RayShape3D.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="RayShape3D" inherits="Shape3D" version="4.0"> + <brief_description> + Ray shape for 3D collisions. + </brief_description> + <description> + Ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="length" type="float" setter="set_length" getter="get_length" default="1.0"> + The ray's length. + </member> + <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope" default="false"> + If [code]true[/code], allow the shape to return the correct normal. + </member> + </members> + <constants> + </constants> +</class> |