diff options
Diffstat (limited to 'doc/classes/Camera2D.xml')
-rw-r--r-- | doc/classes/Camera2D.xml | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index a3a891cdcb..b9373676e2 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Camera2D" inherits="Node2D" version="4.0"> +<class name="Camera2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Camera node for 2D scenes. </brief_description> @@ -30,13 +30,15 @@ <method name="get_camera_position" qualifiers="const"> <return type="Vector2" /> <description> - Returns the camera position. + Returns the camera's [code]position[/code] (the tracked point the camera attempts to follow), relative to the origin. + [b]Note:[/b] The returned value is not the same as [member Node2D.position] or [member Node2D.global_position], as it is affected by the [code]drag[/code] properties. </description> </method> <method name="get_camera_screen_center" qualifiers="const"> <return type="Vector2" /> <description> Returns the location of the [Camera2D]'s screen-center, relative to the origin. + [b]Note:[/b] The real [code]position[/code] of the camera may be different, see [method get_camera_position]. </description> </method> <method name="get_drag_margin" qualifiers="const"> @@ -57,7 +59,7 @@ <return type="void" /> <description> Sets the camera's position immediately to its current smoothing destination. - This has no effect if smoothing is disabled. + This method has no effect if [member smoothing_enabled] is [code]false[/code]. </description> </method> <method name="set_drag_margin"> @@ -95,7 +97,7 @@ </member> <member name="drag_horizontal_offset" type="float" setter="set_drag_horizontal_offset" getter="get_drag_horizontal_offset" default="0.0"> The relative horizontal drag offset of the camera between the right ([code]-1[/code]) and left ([code]1[/code]) drag margins. - [b]Note:[/b] Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when the horizontal drag margin is enabled or the drag margins are changed. + [b]Note:[/b] Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when [member drag_horizontal_enabled] is [code]true[/code] or the drag margins are changed. </member> <member name="drag_left_margin" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2"> Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the left edge of the screen. @@ -111,7 +113,7 @@ </member> <member name="drag_vertical_offset" type="float" setter="set_drag_vertical_offset" getter="get_drag_vertical_offset" default="0.0"> The relative vertical drag offset of the camera between the bottom ([code]-1[/code]) and top ([code]1[/code]) drag margins. - [b]Note:[/b] Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when the vertical drag margin is enabled or the drag margins are changed. + [b]Note:[/b] Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when [member drag_vertical_enabled] is [code]true[/code] or the drag margins are changed. </member> <member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled" default="false"> If [code]true[/code], draws the camera's drag margin rectangle in the editor. @@ -123,30 +125,30 @@ If [code]true[/code], draws the camera's screen rectangle in the editor. </member> <member name="limit_bottom" type="int" setter="set_limit" getter="get_limit" default="10000000"> - Bottom scroll limit in pixels. The camera stops moving when reaching this value. + Bottom scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit. </member> <member name="limit_left" type="int" setter="set_limit" getter="get_limit" default="-10000000"> - Left scroll limit in pixels. The camera stops moving when reaching this value. + Left scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit. </member> <member name="limit_right" type="int" setter="set_limit" getter="get_limit" default="10000000"> - Right scroll limit in pixels. The camera stops moving when reaching this value. + Right scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit. </member> <member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled" default="false"> If [code]true[/code], the camera smoothly stops when reaches its limits. - This has no effect if smoothing is disabled. + This property has no effect if [member smoothing_enabled] is [code]false[/code]. [b]Note:[/b] To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [method reset_smoothing]. </member> <member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000"> - Top scroll limit in pixels. The camera stops moving when reaching this value. + Top scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit. </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2(0, 0)"> - The camera's offset, useful for looking around or camera shake animations. + The camera's relative offset. Useful for looking around or camera shake animations. The offsetted camera can go past the limits defined in [member limit_top], [member limit_bottom], [member limit_left] and [member limit_right]. </member> <member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1"> The camera's process callback. See [enum Camera2DProcessCallback]. </member> <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false"> - If [code]true[/code], the camera rotates with the target. + If [code]true[/code], the camera view rotates with the target. </member> <member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled" default="false"> If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed]. @@ -155,7 +157,7 @@ Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code]. </member> <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" default="Vector2(1, 1)"> - The camera's zoom relative to the viewport. Values larger than [code]Vector2(1, 1)[/code] zoom out and smaller values zoom in. For an example, use [code]Vector2(0.5, 0.5)[/code] for a 2× zoom-in, and [code]Vector2(4, 4)[/code] for a 4× zoom-out. + The camera's zoom. A zoom of [code]Vector(2, 2)[/code] doubles the size seen in the viewport. A zoom of [code]Vector(0.5, 0.5)[/code] halves the size seen in the viewport. </member> </members> <constants> |