godot
godot copied to clipboard
Collision point checker
Gives the scripting API access to 'contains_point' logic for Shape2D's and Collision Shape2D's
- Bugsquad edit, closes: https://github.com/godotengine/godot-proposals/issues/9636
Please open a proposal to track the support and details of this feature
Doing something similar for Shape3D would be very appreciated as well! Most of the primitives would likely be trivial as well.
- You need to generate the docs (and fill them).
- Since this PR seems to be WIP I suggest converting it into a draft (until it's ready for review).
CollisionShape2D::contains_pointneeds to be clearer about whether it takes local/global point in relation to the CollisionShape2D (maybe it's fine as is and just documenting would be enough).- Should
Shape2D::contains_pointbe exposed as well? :thinking: Since it's added anyway...
- You need to generate the docs (and fill them).
- Since this PR seems to be WIP I suggest converting it into a draft (until it's ready for review).
CollisionShape2D::contains_pointneeds to be clearer about whether it takes local/global point in relation to the CollisionShape2D (maybe it's fine as is and just documenting would be enough).- Should
Shape2D::contains_pointbe exposed as well? 🤔 Since it's added anyway...
Docs Generated and filled, contains_point now works globally, and shape2d's don't have their 'contains_point' functions exposed because they only work locally.
Only thing(s) left I reckon is to pass the workflow approval and to perhaps expand it outward to the Shape3D's too.