Closed Nutriz closed 4 years ago
It is indeed confusing, some tutorials for advanced use of the shape owner system are really needed.
CollisionPolygon2D generates many convex shapes, and it does not have an array of the created shapes which may be handy.
You may need to access them with the CollisionObject2D.shape_owner_get_*
methods.
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.
The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.
If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!
Godot version: Godot 3.0.3RC3
Issue description: For 2D physics, we can use
CollisionShape2D
orCollisionPolygon2D
. ForCollisionShape2D
we haveShape2D
objects associated to it, and we can call some useful methods likecollide()
,collide_and_get_contacts()
, but forCollisionPolygon2D
we don't have aShape2D
and methods likecollide()
can't be used. It's a bite confusing. I'm forced to use aCollisionShape2D
withConcavePolygonShape2D
/ConvexPolygonShape2D
? but the aspect of shape like that isn't the as withCollisionPolygon2D
, seems to be segment based, not polygon based.My goal is to make a destructible terrain, so I have an initial shape (generated from an bitmap terrain), and I make hole in it with CircleShape2D, so
collide_and_get_contacts()
will be very useful for that :)