From 3f546b7d7c7dd20493cf5625ffac71816592f86b Mon Sep 17 00:00:00 2001 From: PrecisionRender Date: Fri, 29 Jul 2022 13:10:25 -0500 Subject: Improve `ShapeCast2D` and `ShapeCast3D` docs --- doc/classes/ShapeCast2D.xml | 18 +++++++++--------- doc/classes/ShapeCast3D.xml | 24 ++++++++++++------------ 2 files changed, 21 insertions(+), 21 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml index 5fcb60dd09..70da03dc6e 100644 --- a/doc/classes/ShapeCast2D.xml +++ b/doc/classes/ShapeCast2D.xml @@ -6,7 +6,7 @@ Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons). Immediate collision overlaps can be done with the [member target_position] set to [code]Vector2(0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area2D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area2D] nodes, and when using the signals creates unnecessary complexity. - The node can detect multiple collision objects, but usually the first detected collision + The node can detect multiple collision objects, but it's usually used to detect the first collision. [b]Note:[/b] shape casting is more computationally expensive compared to ray casting. @@ -42,27 +42,27 @@ - The fraction of the motion (between 0 and 1) of how far the shape can move without triggering a collision. The motion is determined by [member target_position]. + The fraction from the [ShapeCast2D]'s origin to its [member target_position] (between 0 and 1) of how far the shape can move without triggering a collision. - The fraction of the motion (between 0 and 1) when the shape triggers a collision. The motion is determined by [member target_position]. + The fraction from the [ShapeCast2D]'s origin to its [member target_position] (between 0 and 1) of how far the shape must move to trigger a collision. - Returns the [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). + Returns the collided [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). - Returns the shape ID of one of the multiple collisions at [code]index[/code] that the shape intersects, or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). + Returns the shape ID of the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). @@ -82,14 +82,14 @@ - Returns the normal containing one of the multiple collisions at [code]index[/code] of the intersecting object. + Returns the normal of one of the multiple collisions at [code]index[/code] of the intersecting object. - Returns the collision point containing one of the multiple collisions at [code]index[/code] at which the shape intersects the object. + Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object. [b]Note:[/b] this point is in the [b]global[/b] coordinate system. @@ -133,7 +133,7 @@ The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. - A complete collision information. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method. + Returns the complete collision information from the collision sweep. The data returned is the same as in the [method PhysicsDirectSpaceState2D.get_rest_info] method. If [code]true[/code], collisions will be reported. @@ -148,7 +148,7 @@ The number of intersections can be limited with this parameter, to reduce the processing time. - Any [Shape2D] derived shape used for collision queries. + The [Shape2D]-derived shape to be used for collision queries. The shape's destination point, relative to this node's [code]position[/code]. diff --git a/doc/classes/ShapeCast3D.xml b/doc/classes/ShapeCast3D.xml index 1f2ea96f42..085bc9acd1 100644 --- a/doc/classes/ShapeCast3D.xml +++ b/doc/classes/ShapeCast3D.xml @@ -6,7 +6,7 @@ Shape casting allows to detect collision objects by sweeping the [member shape] along the cast direction determined by [member target_position] (useful for things like beam weapons). Immediate collision overlaps can be done with the [member target_position] set to [code]Vector3(0, 0, 0)[/code] and by calling [method force_shapecast_update] within the same [b]physics_frame[/b]. This also helps to overcome some limitations of [Area3D] when used as a continuous detection area, often requiring waiting a couple of frames before collision information is available to [Area3D] nodes, and when using the signals creates unnecessary complexity. - The node can detect multiple collision objects, but usually the first detected collision. + The node can detect multiple collision objects, but it's usually used to detect the first collision. [b]Note:[/b] Shape casting is more computationally expensive compared to ray casting. @@ -29,7 +29,7 @@ - Removes all collision exceptions for this shape. + Removes all collision exceptions for this [ShapeCast3D]. @@ -42,27 +42,27 @@ - The fraction of the motion (between 0 and 1) of how far the shape can move without triggering a collision. The motion is determined by [member target_position]. + The fraction from the [ShapeCast3D]'s origin to its [member target_position] (between 0 and 1) of how far the shape can move without triggering a collision. - The fraction of the motion (between 0 and 1) when the shape triggers a collision. The motion is determined by [member target_position]. + The fraction from the [ShapeCast3D]'s origin to its [member target_position] (between 0 and 1) of how far the shape must move to trigger a collision. - Returns the [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). + Returns the collided [Object] of one of the multiple collisions at [code]index[/code], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). - Returns the shape ID of one of the multiple collisions at [code]index[/code] that the shape intersects, or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). + Returns the shape ID of the colliding shape of one of the multiple collisions at [code]index[/code], or [code]0[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). @@ -82,14 +82,14 @@ - Returns the normal containing one of the multiple collisions at [code]index[/code] of the intersecting object. + Returns the normal of one of the multiple collisions at [code]index[/code] of the intersecting object. - Returns the collision point containing one of the multiple collisions at [code]index[/code] at which the shape intersects the object. + Returns the collision point of one of the multiple collisions at [code]index[/code] where the shape intersects the colliding object. [b]Note:[/b] this point is in the [b]global[/b] coordinate system. @@ -117,7 +117,7 @@ - Used internally to update the debug gizmo in the editor. Any code placed in this function will be called whenever the [member shape] resource is modified. + This method is used internally to update the debug gizmo in the editor. Any code placed in this function will be called whenever the [member shape] resource is modified. @@ -137,10 +137,10 @@ If [code]true[/code], collision with [PhysicsBody3D]s will be reported. - The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. + The shape's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - A complete collision information. The data returned is the same as in the [method PhysicsDirectSpaceState3D.get_rest_info] method. + Returns the complete collision information from the collision sweep. The data returned is the same as in the [method PhysicsDirectSpaceState3D.get_rest_info] method. The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [ShapeCast3D] is colliding with something. @@ -159,7 +159,7 @@ The number of intersections can be limited with this parameter, to reduce the processing time. - Any [Shape3D] derived shape used for collision queries. + The [Shape3D]-derived shape to be used for collision queries. The shape's destination point, relative to this node's [code]position[/code]. -- cgit v1.2.3