PhysicsBody2D.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="PhysicsBody2D" inherits="CollisionObject2D" version="3.4">
  3. <brief_description>
  4. Base class for all objects affected by physics in 2D space.
  5. </brief_description>
  6. <description>
  7. PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it.
  8. </description>
  9. <tutorials>
  10. <link>https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html</link>
  11. </tutorials>
  12. <methods>
  13. <method name="add_collision_exception_with">
  14. <return type="void">
  15. </return>
  16. <argument index="0" name="body" type="Node">
  17. </argument>
  18. <description>
  19. Adds a body to the list of bodies that this body can't collide with.
  20. </description>
  21. </method>
  22. <method name="get_collision_exceptions">
  23. <return type="Array">
  24. </return>
  25. <description>
  26. Returns an array of nodes that were added as collision exceptions for this body.
  27. </description>
  28. </method>
  29. <method name="remove_collision_exception_with">
  30. <return type="void">
  31. </return>
  32. <argument index="0" name="body" type="Node">
  33. </argument>
  34. <description>
  35. Removes a body from the list of bodies that this body can't collide with.
  36. </description>
  37. </method>
  38. </methods>
  39. <members>
  40. <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" override="true" default="false" />
  41. <member name="layers" type="int" setter="_set_layers" getter="_get_layers">
  42. Both collision_layer and collision_mask. Returns collision_layer when accessed. Updates collision_layer and collision_mask when modified.
  43. </member>
  44. </members>
  45. <constants>
  46. </constants>
  47. </class>