diff options
Diffstat (limited to 'doc/classes/Node3D.xml')
-rw-r--r-- | doc/classes/Node3D.xml | 45 |
1 files changed, 15 insertions, 30 deletions
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 8a8a68ec35..1aa71113e9 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -6,7 +6,7 @@ <description> Most basic 3D game object, with a 3D [Transform3D] and visibility settings. All other 3D game objects inherit from Node3D. Use [Node3D] as a parent node to move, scale, rotate and show/hide children in a 3D project. Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Node3D] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Node3D]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Node3D] object itself is referred to as object-local coordinate system. - [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg2rad]. + [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg_to_rad]. </description> <tutorials> <link title="Introduction to 3D">$DOCS_URL/tutorials/3d/introduction_to_3d.html</link> @@ -39,7 +39,7 @@ </description> </method> <method name="get_gizmos" qualifiers="const"> - <return type="Array" /> + <return type="Node3DGizmo[]" /> <description> Returns all the gizmos attached to this [code]Node3D[/code]. </description> @@ -116,7 +116,7 @@ Rotates the node so that the local forward axis (-Z) points toward the [param target] position. The local up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. The [param target] position cannot be the same as the node's position, the [param up] vector cannot be zero, and the direction from the node's position to the [param target] vector cannot be parallel to the [param up] vector. - Operations take place in global space. + Operations take place in global space, which means that the node must be in the scene tree. </description> </method> <method name="look_at_from_position"> @@ -134,20 +134,6 @@ Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D]. </description> </method> - <method name="property_can_revert"> - <return type="bool" /> - <param index="0" name="name" type="String" /> - <description> - Returns [code]true[/code] if the property identified by [param name] can be reverted to a default value. - </description> - </method> - <method name="property_get_revert"> - <return type="Variant" /> - <param index="0" name="name" type="String" /> - <description> - Returns the default value of the Node3D property with given [param name]. - </description> - </method> <method name="rotate"> <return type="void" /> <param index="0" name="axis" type="Vector3" /> @@ -288,6 +274,9 @@ Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. </member> + <member name="global_rotation_degrees" type="Vector3" setter="set_global_rotation_degrees" getter="get_global_rotation_degrees"> + Helper property to access [member global_rotation] in degrees instead of radians. + </member> <member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform"> World3D space (global) [Transform3D] of this node. </member> @@ -301,15 +290,19 @@ Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotaton in the order specified by the [member rotation_order] property. [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. </member> + <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees"> + Helper property to access [member rotation] in degrees instead of radians. + </member> <member name="rotation_edit_mode" type="int" setter="set_rotation_edit_mode" getter="get_rotation_edit_mode" enum="Node3D.RotationEditMode" default="0"> Specify how rotation (and scale) will be presented in the editor. </member> - <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="Node3D.RotationOrder" default="2"> + <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="EulerOrder" default="2"> Specify the axis rotation order of the [member rotation] property. The final orientation is constructed by rotating the Euler angles in the order specified by this property. </member> <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)"> Scale part of the local transformation. [b]Note:[/b] Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative. + [b]Note:[/b] Not all nodes are visually scaled by the [member scale] property. For example, [Light3D]s are not visually affected by [member scale]. </member> <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false"> If [code]true[/code], the node will not inherit its transformations from its parent. Node transformations are only in global space. @@ -345,23 +338,15 @@ <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43"> Node3D nodes receives this notification when their visibility changes. </constant> + <constant name="NOTIFICATION_LOCAL_TRANSFORM_CHANGED" value="44"> + Node3D nodes receives this notification when their local transform changes. This is not received when the transform of a parent node is changed. + In order for [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_local_transform]. + </constant> <constant name="ROTATION_EDIT_MODE_EULER" value="0" enum="RotationEditMode"> </constant> <constant name="ROTATION_EDIT_MODE_QUATERNION" value="1" enum="RotationEditMode"> </constant> <constant name="ROTATION_EDIT_MODE_BASIS" value="2" enum="RotationEditMode"> </constant> - <constant name="ROTATION_ORDER_XYZ" value="0" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_XZY" value="1" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_YXZ" value="2" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_YZX" value="3" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_ZXY" value="4" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_ZYX" value="5" enum="RotationOrder"> - </constant> </constants> </class> |