CollisionPolygon2D.xml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.1">
  3. <brief_description>
  4. Defines a 2D collision polygon.
  5. </brief_description>
  6. <description>
  7. Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygon can be drawn in the editor or specified by a list of vertices.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. </methods>
  15. <members>
  16. <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode">
  17. Collision build mode. Use one of the [code]BUILD_*[/code] constants. Default value: [code]BUILD_SOLIDS[/code].
  18. </member>
  19. <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
  20. If [code]true[/code], no collisions will be detected.
  21. </member>
  22. <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled">
  23. If [code]true[/code], only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects.
  24. </member>
  25. <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin">
  26. </member>
  27. <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
  28. The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference.
  29. </member>
  30. </members>
  31. <constants>
  32. <constant name="BUILD_SOLIDS" value="0" enum="BuildMode">
  33. Collisions will include the polygon and its contained area.
  34. </constant>
  35. <constant name="BUILD_SEGMENTS" value="1" enum="BuildMode">
  36. Collisions will only include the polygon edges.
  37. </constant>
  38. </constants>
  39. </class>