Browse Source

Merge pull request #32599 from cbscribe/kcc_doc_clippedcamera

[DOC] Document ClippedCamera properties/methods.
Rémi Verschelde 5 years ago
parent
commit
7801fdfedb
1 changed files with 19 additions and 0 deletions
  1. 19 0
      doc/classes/ClippedCamera.xml

+ 19 - 0
doc/classes/ClippedCamera.xml

@@ -1,8 +1,10 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <class name="ClippedCamera" inherits="Camera" category="Core" version="3.2">
 <class name="ClippedCamera" inherits="Camera" category="Core" version="3.2">
 	<brief_description>
 	<brief_description>
+		A [Camera] that includes collision.
 	</brief_description>
 	</brief_description>
 	<description>
 	<description>
+		This node extends [Camera] to add collisions with [Area] and/or [PhysicsBody] nodes. The camera cannot move through colliding objects.
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>
@@ -13,6 +15,7 @@
 			<argument index="0" name="node" type="Object">
 			<argument index="0" name="node" type="Object">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Adds a collision exception so the camera does not collide with the specified node.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="add_exception_rid">
 		<method name="add_exception_rid">
@@ -21,18 +24,21 @@
 			<argument index="0" name="rid" type="RID">
 			<argument index="0" name="rid" type="RID">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Adds a collision exception so the camera does not collide with the specified [RID].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="clear_exceptions">
 		<method name="clear_exceptions">
 			<return type="void">
 			<return type="void">
 			</return>
 			</return>
 			<description>
 			<description>
+				Removes all collision exceptions.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_clip_offset" qualifiers="const">
 		<method name="get_clip_offset" qualifiers="const">
 			<return type="float">
 			<return type="float">
 			</return>
 			</return>
 			<description>
 			<description>
+				Returns the distance the camera has been offset due to a collision.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="get_collision_mask_bit" qualifiers="const">
 		<method name="get_collision_mask_bit" qualifiers="const">
@@ -41,6 +47,8 @@
 			<argument index="0" name="bit" type="int">
 			<argument index="0" name="bit" type="int">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Returns [code]true[/code] if the specified bit index is on.
+				[b]Note:[/b] Bit indices range from 0-19.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="remove_exception">
 		<method name="remove_exception">
@@ -49,6 +57,7 @@
 			<argument index="0" name="node" type="Object">
 			<argument index="0" name="node" type="Object">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Removes a collision exception with the specified node.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="remove_exception_rid">
 		<method name="remove_exception_rid">
@@ -57,6 +66,7 @@
 			<argument index="0" name="rid" type="RID">
 			<argument index="0" name="rid" type="RID">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Removes a collision exception with the specified [RID].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="set_collision_mask_bit">
 		<method name="set_collision_mask_bit">
@@ -67,25 +77,34 @@
 			<argument index="1" name="value" type="bool">
 			<argument index="1" name="value" type="bool">
 			</argument>
 			</argument>
 			<description>
 			<description>
+				Sets the specified bit index to the [code]value[/code].
+				[b]Note:[/b] Bit indices range from 0-19.
 			</description>
 			</description>
 		</method>
 		</method>
 	</methods>
 	</methods>
 	<members>
 	<members>
 		<member name="clip_to_areas" type="bool" setter="set_clip_to_areas" getter="is_clip_to_areas_enabled" default="false">
 		<member name="clip_to_areas" type="bool" setter="set_clip_to_areas" getter="is_clip_to_areas_enabled" default="false">
+			If [code]true[/code], the camera stops on contact with [Area]s.
 		</member>
 		</member>
 		<member name="clip_to_bodies" type="bool" setter="set_clip_to_bodies" getter="is_clip_to_bodies_enabled" default="true">
 		<member name="clip_to_bodies" type="bool" setter="set_clip_to_bodies" getter="is_clip_to_bodies_enabled" default="true">
+			If [code]true[/code], the camera stops on contact with [PhysicsBody]s.
 		</member>
 		</member>
 		<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
 		<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1">
+			The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected.
 		</member>
 		</member>
 		<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
 		<member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0">
+			The camera's collision margin. The camera can't get closer than this distance to a colliding object.
 		</member>
 		</member>
 		<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera.ProcessMode" default="0">
 		<member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera.ProcessMode" default="0">
+			The camera's process callback. See [enum ProcessMode].
 		</member>
 		</member>
 	</members>
 	</members>
 	<constants>
 	<constants>
 		<constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ProcessMode">
 		<constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ProcessMode">
+			The camera updates with the [code]_physics_process[/code] callback.
 		</constant>
 		</constant>
 		<constant name="CLIP_PROCESS_IDLE" value="1" enum="ProcessMode">
 		<constant name="CLIP_PROCESS_IDLE" value="1" enum="ProcessMode">
+			The camera updates with the [code]_process[/code] callback.
 		</constant>
 		</constant>
 	</constants>
 	</constants>
 </class>
 </class>