diff --git a/doc/base/classes.xml b/doc/base/classes.xml index deed5c5cdad..c18cba09a47 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -31861,14 +31861,21 @@ + Query the closest object intersecting a ray. + A RayCast represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 3D space in order to find the closest object intersecting with the ray. + + RayCast can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks. + + Only enabled raycasts will be able to query the space and report collisions! + Adds a collision exception so the ray does not report collisions with the specified [code]node[/code]. @@ -31879,30 +31886,35 @@ + Removes all collision exception for this ray. + Return the destination point of this ray object. + Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. + Returns the collision shape of the closest object the ray is pointing to. + Returns the normal of the intersecting object shape face containing the collision point. @@ -31916,30 +31928,35 @@ + Returns the layer mask for this ray. + Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [PhysicsDirectSpaceState]. + Return whether the closest object the ray is pointing to is colliding with the vector (considering the vector length). + Returns whether this raycast is enabled or not. + Removes a collision exception so the ray does report collisions with the specified [code]node[/code]. @@ -31959,18 +31976,21 @@ + Enables the RayCast2D. Only enabled raycasts will be able to query the space and report collisions. + Set the mask to filter objects. Only objects with at least the same mask element set will be detected. + Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [PhysicsDirectSpaceState], eg. [code]PhysicsDirectSpaceState.TYPE_MASK_STATIC_BODY | PhysicsDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types. @@ -31979,10 +31999,14 @@ - Query the closest object intersecting a ray + Query the closest object intersecting a ray. A RayCast2D represents a line from its origin to its destination position [code]cast_to[/code], it is used to query the 2D space in order to find the closest object intersecting with the ray. + + RayCast2D can ignore some objects by adding them to the exception list via [code]add_exception[/code], setting proper filtering with layers, or by filtering object types with type masks. + + Only enabled raycasts will be able to query the space and report collisions! @@ -32007,7 +32031,7 @@ - Return the destination point of this ray object + Return the destination point of this ray object. @@ -32035,13 +32059,14 @@ - Returns the collision point in which the ray intersects the closest object. + Returns the collision point in which the ray intersects the closest object. This point is in [b]global[/b] coordinate system. + Returns whether this ray should hit your parent node, if it's a body. @@ -32055,6 +32080,7 @@ + Returns the type mask (types of objects to detect) for this ray. The value is a sum (bitwise OR'd) of constants available for [Physics2DDirectSpaceState]. @@ -32068,7 +32094,7 @@ - Returns whether this raycast is enabled or not + Returns whether this raycast is enabled or not. @@ -32102,18 +32128,21 @@ + Toggle whether this ray should hit your parent node, if it's a body. + Set the mask to filter objects. Only objects with at least the same mask element set will be detected. + Set the types of objects to detect. For [code]mask[/code] use a logic sum (OR operation) of constants defined in [Physics2DDirectSpaceState], eg. [code]Physics2DDirectSpaceState.TYPE_MASK_STATIC_BODY | Physics2DDirectSpaceState.TYPE_MASK_KINEMATIC_BODY[/code] to detect only those two types.