CollisionPolygon2D.xml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="CollisionPolygon2D" inherits="Node2D" category="Core" version="3.1.2">
  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. <methods>
  12. </methods>
  13. <members>
  14. <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode">
  15. Collision build mode. Use one of the [code]BUILD_*[/code] constants. Default value: [constant BUILD_SOLIDS].
  16. </member>
  17. <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
  18. If [code]true[/code], no collisions will be detected.
  19. </member>
  20. <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled">
  21. If [code]true[/code], only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects.
  22. </member>
  23. <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin">
  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. The returned value is a clone of the PoolVector2Array, not a reference.
  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>