godotengine / godotengine/godot-docs
ShapeCast2D documentation does not explain what the node does and contains ambiguities
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**Your Godot version:**
v4.1.2.stable.official [399c9dc39]
**Issue description:**
The documentation does not help me to understand the intended use-case for this node. In particular, what is its intended purpose as opposed to Area2D? The text refers to differences between it and Area2D, but these differences are not explained.
For example:
> It is useful for things like wide laser beams or snapping a simple shape to a floor.
Why is it useful for these? It does not explain why.
How would the reader know in what way the node can be used to help snap a simple shape to a floor?
The RayCast2D docs state:
> A raycast represents a ray from its origin to its target_position that finds the closest CollisionObject2D along its path, if it intersects any.
Does the ShapeCast2D also do this? The documentation does not state that. It just makes vague statements about sweeping:
> This is similar to RayCast2D but it allows for sweeping a region of space, rather than just a straight line.
The ShapeCast2D documentation should make sense on its own without needing to refer to another Node's documentation page, especially if that Node (RayCast2D) is not further up the inheritance hierarchy.
In terms of style, there is a problem - this sentence contains a dangling modifier and is therefore ambiguous:
> This helps to overcome some limitations of Area2D when used as an instantaneous detection area, as collision information isn't immediately available to it.
Available to what? The Area2D or the ShapeCast2D?
I do not know the intended use case for ShapeCast2D so I cannot suggest a fix.
**URL to the documentation page (if already existing):**
https://docs.godotengine.org/en/4.1/classes/class_shapecast2d.html
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.