godot icon indicating copy to clipboard operation
godot copied to clipboard

Collision point checker

Open AdeptusForge opened this issue 1 year ago • 4 comments
trafficstars

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

AdeptusForge avatar Apr 30 '24 08:04 AdeptusForge

Please open a proposal to track the support and details of this feature

AThousandShips avatar Apr 30 '24 08:04 AThousandShips

Doing something similar for Shape3D would be very appreciated as well! Most of the primitives would likely be trivial as well.

RedMser avatar Apr 30 '24 10:04 RedMser

  • 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_point needs 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_point be exposed as well? :thinking: Since it's added anyway...

kleonc avatar Apr 30 '24 12:04 kleonc

  • 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_point needs 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_point be 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.

AdeptusForge avatar May 01 '24 07:05 AdeptusForge