ClippedCamera.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ClippedCamera" inherits="Camera" version="3.4">
  3. <brief_description>
  4. A [Camera] that includes collision.
  5. </brief_description>
  6. <description>
  7. This node extends [Camera] to add collisions with [Area] and/or [PhysicsBody] nodes. The camera cannot move through colliding objects.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="add_exception">
  13. <return type="void">
  14. </return>
  15. <argument index="0" name="node" type="Object">
  16. </argument>
  17. <description>
  18. Adds a collision exception so the camera does not collide with the specified node.
  19. </description>
  20. </method>
  21. <method name="add_exception_rid">
  22. <return type="void">
  23. </return>
  24. <argument index="0" name="rid" type="RID">
  25. </argument>
  26. <description>
  27. Adds a collision exception so the camera does not collide with the specified [RID].
  28. </description>
  29. </method>
  30. <method name="clear_exceptions">
  31. <return type="void">
  32. </return>
  33. <description>
  34. Removes all collision exceptions.
  35. </description>
  36. </method>
  37. <method name="get_clip_offset" qualifiers="const">
  38. <return type="float">
  39. </return>
  40. <description>
  41. Returns the distance the camera has been offset due to a collision.
  42. </description>
  43. </method>
  44. <method name="get_collision_mask_bit" qualifiers="const">
  45. <return type="bool">
  46. </return>
  47. <argument index="0" name="bit" type="int">
  48. </argument>
  49. <description>
  50. Returns [code]true[/code] if the specified bit index is on.
  51. [b]Note:[/b] Bit indices range from 0-19.
  52. </description>
  53. </method>
  54. <method name="remove_exception">
  55. <return type="void">
  56. </return>
  57. <argument index="0" name="node" type="Object">
  58. </argument>
  59. <description>
  60. Removes a collision exception with the specified node.
  61. </description>
  62. </method>
  63. <method name="remove_exception_rid">
  64. <return type="void">
  65. </return>
  66. <argument index="0" name="rid" type="RID">
  67. </argument>
  68. <description>
  69. Removes a collision exception with the specified [RID].
  70. </description>
  71. </method>
  72. <method name="set_collision_mask_bit">
  73. <return type="void">
  74. </return>
  75. <argument index="0" name="bit" type="int">
  76. </argument>
  77. <argument index="1" name="value" type="bool">
  78. </argument>
  79. <description>
  80. Sets the specified bit index to the [code]value[/code].
  81. [b]Note:[/b] Bit indices range from 0-19.
  82. </description>
  83. </method>
  84. </methods>
  85. <members>
  86. <member name="clip_to_areas" type="bool" setter="set_clip_to_areas" getter="is_clip_to_areas_enabled" default="false">
  87. If [code]true[/code], the camera stops on contact with [Area]s.
  88. </member>
  89. <member name="clip_to_bodies" type="bool" setter="set_clip_to_bodies" getter="is_clip_to_bodies_enabled" default="true">
  90. If [code]true[/code], the camera stops on contact with [PhysicsBody]s.
  91. </member>
  92. <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
  93. The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information.
  94. </member>
  95. <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
  96. The camera's collision margin. The camera can't get closer than this distance to a colliding object.
  97. </member>
  98. <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera.ProcessMode" default="0">
  99. The camera's process callback. See [enum ProcessMode].
  100. </member>
  101. </members>
  102. <constants>
  103. <constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ProcessMode">
  104. The camera updates with the [code]_physics_process[/code] callback.
  105. </constant>
  106. <constant name="CLIP_PROCESS_IDLE" value="1" enum="ProcessMode">
  107. The camera updates with the [code]_process[/code] callback.
  108. </constant>
  109. </constants>
  110. </class>