CollisionPolygon2D.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
  26. The polygon's list of vertices. The final point will be connected to the first.
  27. </member>
  28. </members>
  29. <constants>
  30. <constant name="BUILD_SOLIDS" value="0" enum="BuildMode">
  31. Collisions will include the polygon and its contained area.
  32. </constant>
  33. <constant name="BUILD_SEGMENTS" value="1" enum="BuildMode">
  34. Collisions will only include the polygon edges.
  35. </constant>
  36. </constants>
  37. </class>