[DOCS] Tweaks and fixes for (Interpolated)Camera

This commit is contained in:
Mel Collins 2018-04-03 15:58:21 +02:00
parent 9ad1800298
commit 99110772c0
2 changed files with 14 additions and 14 deletions

View File

@ -22,7 +22,7 @@
<return type="Transform"> <return type="Transform">
</return> </return>
<description> <description>
Get the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform. Gets the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform.
</description> </description>
</method> </method>
<method name="is_position_behind" qualifiers="const"> <method name="is_position_behind" qualifiers="const">
@ -31,14 +31,14 @@
<argument index="0" name="world_point" type="Vector3"> <argument index="0" name="world_point" type="Vector3">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the given position is behind the Camera. Returns [code]true[/code] if the given position is behind the Camera. Note that a position which returns [code]false[/code] may still be outside the Camera's field of view.
</description> </description>
</method> </method>
<method name="make_current"> <method name="make_current">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added. Makes this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
</description> </description>
</method> </method>
<method name="project_local_ray_normal" qualifiers="const"> <method name="project_local_ray_normal" qualifiers="const">
@ -56,7 +56,7 @@
<argument index="0" name="screen_point" type="Vector2"> <argument index="0" name="screen_point" type="Vector2">
</argument> </argument>
<description> <description>
Returns how a 2D coordinate in the Viewport rectangle maps to a 3D point in worldspace. Returns the 3D point in worldspace that maps to the given 2D coordinate in the [Viewport] rectangle.
</description> </description>
</method> </method>
<method name="project_ray_normal" qualifiers="const"> <method name="project_ray_normal" qualifiers="const">
@ -87,7 +87,7 @@
<argument index="2" name="z_far" type="float"> <argument index="2" name="z_far" type="float">
</argument> </argument>
<description> <description>
Set the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) Sets the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels)
</description> </description>
</method> </method>
<method name="set_perspective"> <method name="set_perspective">
@ -100,7 +100,7 @@
<argument index="2" name="z_far" type="float"> <argument index="2" name="z_far" type="float">
</argument> </argument>
<description> <description>
Set the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. Sets the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units.
</description> </description>
</method> </method>
<method name="unproject_position" qualifiers="const"> <method name="unproject_position" qualifiers="const">
@ -109,7 +109,7 @@
<argument index="0" name="world_point" type="Vector3"> <argument index="0" name="world_point" type="Vector3">
</argument> </argument>
<description> <description>
Returns how a 3D point in worldspace maps to a 2D coordinate in the [Viewport] rectangle. Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in worldspace.
</description> </description>
</method> </method>
</methods> </methods>
@ -124,7 +124,7 @@
If not [code]DOPPLER_TRACKING_DISABLED[/code] this Camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. Default value: [code]DOPPLER_TRACKING_DISABLED[/code]. If not [code]DOPPLER_TRACKING_DISABLED[/code] this Camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. Default value: [code]DOPPLER_TRACKING_DISABLED[/code].
</member> </member>
<member name="environment" type="Environment" setter="set_environment" getter="get_environment"> <member name="environment" type="Environment" setter="set_environment" getter="get_environment">
Set the [Environment] to use for this Camera. The [Environment] to use for this Camera.
</member> </member>
<member name="far" type="float" setter="set_zfar" getter="get_zfar"> <member name="far" type="float" setter="set_zfar" getter="get_zfar">
The distance to the far culling boundary for this Camera relative to its local z-axis. The distance to the far culling boundary for this Camera relative to its local z-axis.
@ -136,7 +136,7 @@
The horizontal (X) offset of the Camera viewport. The horizontal (X) offset of the Camera viewport.
</member> </member>
<member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera.KeepAspect"> <member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera.KeepAspect">
The axis to lock during [member fov]/[member size] adjustments. The axis to lock during [member fov]/[member size] adjustments. Can be either [code]KEEP_WIDTH[/code] or [code]KEEP_HEIGHT[/code].
</member> </member>
<member name="near" type="float" setter="set_znear" getter="get_znear"> <member name="near" type="float" setter="set_znear" getter="get_znear">
The distance to the near culling boundary for this Camera relative to its local z-axis. The distance to the near culling boundary for this Camera relative to its local z-axis.
@ -148,7 +148,7 @@
The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since [member keep_aspect] locks on axis, [code]size[/code] sets the other axis' size length. The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since [member keep_aspect] locks on axis, [code]size[/code] sets the other axis' size length.
</member> </member>
<member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset"> <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset">
The horizontal (Y) offset of the Camera viewport. The vertical (Y) offset of the Camera viewport.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -5,7 +5,7 @@
</brief_description> </brief_description>
<description> <description>
InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation. InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation.
If it is not [member enabled], or does not have a valid target set, InterpolatedCamera acts like a normal Camera. If it is not [member enabled] or does not have a valid target set, InterpolatedCamera acts like a normal Camera.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@ -18,16 +18,16 @@
<argument index="0" name="target" type="Object"> <argument index="0" name="target" type="Object">
</argument> </argument>
<description> <description>
Set the node to move toward. Sets the node to move toward and orient with.
</description> </description>
</method> </method>
</methods> </methods>
<members> <members>
<member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled"> <member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled">
If [code]true[/code], and a target is set, the camera will move automatically. If [code]true[/code] and a target is set, the camera will move automatically.
</member> </member>
<member name="speed" type="float" setter="set_speed" getter="get_speed"> <member name="speed" type="float" setter="set_speed" getter="get_speed">
How quickly the camera moves. How quickly the camera moves toward its target. Higher values will result in tighter camera motion.
</member> </member>
<member name="target" type="NodePath" setter="set_target_path" getter="get_target_path"> <member name="target" type="NodePath" setter="set_target_path" getter="get_target_path">
The target's [NodePath]. The target's [NodePath].