| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="Node3D" inherits="Node" keywords="spatial" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Base object in 3D space, inherited by all 3D nodes. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | The [Node3D] node is the base representation of a node in 3D space. All other 3D nodes inherit from this class. |
| 8 | Affine operations (translation, rotation, scale) are calculated in the coordinate system relative to the parent, unless the [Node3D]'s [member top_level] is [code]true[/code]. In this coordinate system, affine operations correspond to direct affine operations on the [Node3D]'s [member transform]. The term [i]parent space[/i] refers to this coordinate system. The coordinate system that is attached to the [Node3D] itself is referred to as object-local coordinate system, or [i]local space[/i]. |
| 9 | [b]Note:[/b] Unless otherwise specified, all methods that need angle parameters must receive angles in [i]radians[/i]. To convert degrees to radians, use [method @GlobalScope.deg_to_rad]. |
| 10 | [b]Note:[/b] In Godot 3 and older, [Node3D] was named [i]Spatial[/i]. |
| 11 | </description> |
| 12 | <tutorials> |
| 13 | <link title="Introduction to 3D">$DOCS_URL/tutorials/3d/introduction_to_3d.html</link> |
| 14 | <link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link> |
| 15 | </tutorials> |
| 16 | <methods> |
| 17 | <method name="add_gizmo"> |
| 18 | <return type="void" /> |
| 19 | <param index="0" name="gizmo" type="Node3DGizmo" /> |
| 20 | <description> |
| 21 | Attaches the given [param gizmo] to this node. Only works in the editor. |
| 22 | [b]Note:[/b] [param gizmo] should be an [EditorNode3DGizmo]. The argument type is [Node3DGizmo] to avoid depending on editor classes in [Node3D]. |
| 23 | </description> |
| 24 | </method> |
| 25 | <method name="clear_gizmos"> |
| 26 | <return type="void" /> |
| 27 | <description> |
| 28 | Clears all [EditorNode3DGizmo] objects attached to this node. Only works in the editor. |
| 29 | </description> |
| 30 | </method> |
| 31 | <method name="clear_subgizmo_selection"> |
| 32 | <return type="void" /> |
| 33 | <description> |
| 34 | Deselects all subgizmos for this node. Useful to call when the selected subgizmo may no longer exist after a property change. Only works in the editor. |
| 35 | </description> |
| 36 | </method> |
| 37 | <method name="force_update_transform"> |
| 38 | <return type="void" /> |
| 39 | <description> |
| 40 | Forces the node's [member global_transform] to update, by sending [constant NOTIFICATION_TRANSFORM_CHANGED]. Fails if the node is not inside the tree. |
| 41 | [b]Note:[/b] For performance reasons, transform changes are usually accumulated and applied [i]once[/i] at the end of the frame. The update propagates through [Node3D] children, as well. Therefore, use this method only when you need an up-to-date transform (such as during physics operations). |
| 42 | </description> |
| 43 | </method> |
| 44 | <method name="get_gizmos" qualifiers="const"> |
| 45 | <return type="Node3DGizmo[]" /> |
| 46 | <description> |
| 47 | Returns all the [EditorNode3DGizmo] objects attached to this node. Only works in the editor. |
| 48 | </description> |
| 49 | </method> |
| 50 | <method name="get_global_transform_interpolated"> |
| 51 | <return type="Transform3D" /> |
| 52 | <description> |
| 53 | When using physics interpolation, there will be circumstances in which you want to know the interpolated (displayed) transform of a node rather than the standard transform (which may only be accurate to the most recent physics tick). |
| 54 | This is particularly important for frame-based operations that take place in [method Node._process], rather than [method Node._physics_process]. Examples include [Camera3D]s focusing on a node, or finding where to fire lasers from on a frame rather than physics tick. |
| 55 | [b]Note:[/b] This function creates an interpolation pump on the [Node3D] the first time it is called, which can respond to physics interpolation resets. If you get problems with "streaking" when initially following a [Node3D], be sure to call [method get_global_transform_interpolated] at least once [i]before[/i] resetting the [Node3D] physics interpolation. |
| 56 | </description> |
| 57 | </method> |
| 58 | <method name="get_parent_node_3d" qualifiers="const"> |
| 59 | <return type="Node3D" /> |
| 60 | <description> |
| 61 | Returns the parent [Node3D] that directly affects this node's [member global_transform]. Returns [code]null[/code] if no parent exists, the parent is not a [Node3D], or [member top_level] is [code]true[/code]. |
| 62 | [b]Note:[/b] This method is not always equivalent to [method Node.get_parent], which does not take [member top_level] into account. |
| 63 | </description> |
| 64 | </method> |
| 65 | <method name="get_world_3d" qualifiers="const"> |
| 66 | <return type="World3D" /> |
| 67 | <description> |
| 68 | Returns the [World3D] this node is registered to. |
| 69 | Usually, this is the same as the world used by this node's viewport (see [method Node.get_viewport] and [method Viewport.find_world_3d]). |
| 70 | </description> |
| 71 | </method> |
| 72 | <method name="global_rotate"> |
| 73 | <return type="void" /> |
| 74 | <param index="0" name="axis" type="Vector3" /> |
| 75 | <param index="1" name="angle" type="float" /> |
| 76 | <description> |
| 77 | Rotates this node's [member global_basis] around the global [param axis] by the given [param angle], in radians. This operation is calculated in global space (relative to the world) and preserves the [member global_position]. |
| 78 | </description> |
| 79 | </method> |
| 80 | <method name="global_scale"> |
| 81 | <return type="void" /> |
| 82 | <param index="0" name="scale" type="Vector3" /> |
| 83 | <description> |
| 84 | Scales this node's [member global_basis] by the given [param scale] factor. This operation is calculated in global space (relative to the world) and preserves the [member global_position]. |
| 85 | [b]Note:[/b] This method is not to be confused with the [member scale] property. |
| 86 | </description> |
| 87 | </method> |
| 88 | <method name="global_translate"> |
| 89 | <return type="void" /> |
| 90 | <param index="0" name="offset" type="Vector3" /> |
| 91 | <description> |
| 92 | Adds the given translation [param offset] to the node's [member global_position] in global space (relative to the world). |
| 93 | </description> |
| 94 | </method> |
| 95 | <method name="hide"> |
| 96 | <return type="void" /> |
| 97 | <description> |
| 98 | Prevents this node from being rendered. Equivalent to setting [member visible] to [code]false[/code]. This is the opposite of [method show]. |
| 99 | </description> |
| 100 | </method> |
| 101 | <method name="is_local_transform_notification_enabled" qualifiers="const"> |
| 102 | <return type="bool" /> |
| 103 | <description> |
| 104 | Returns [code]true[/code] if the node receives [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever [member transform] changes. This is enabled with [method set_notify_local_transform]. |
| 105 | </description> |
| 106 | </method> |
| 107 | <method name="is_scale_disabled" qualifiers="const"> |
| 108 | <return type="bool" /> |
| 109 | <description> |
| 110 | Returns [code]true[/code] if this node's [member global_transform] is automatically orthonormalized. This results in this node not appearing distorted, as if its global scale were set to [constant Vector3.ONE] (or its negative counterpart). See also [method set_disable_scale] and [method orthonormalize]. |
| 111 | [b]Note:[/b] [member transform] is not affected by this setting. |
| 112 | </description> |
| 113 | </method> |
| 114 | <method name="is_transform_notification_enabled" qualifiers="const"> |
| 115 | <return type="bool" /> |
| 116 | <description> |
| 117 | Returns [code]true[/code] if the node receives [constant NOTIFICATION_TRANSFORM_CHANGED] whenever [member global_transform] changes. This is enabled with [method set_notify_transform]. |
| 118 | </description> |
| 119 | </method> |
| 120 | <method name="is_visible_in_tree" qualifiers="const"> |
| 121 | <return type="bool" /> |
| 122 | <description> |
| 123 | Returns [code]true[/code] if this node is inside the scene tree and the [member visible] property is [code]true[/code] for this node and all of its [Node3D] ancestors [i]in sequence[/i]. An ancestor of any other type (such as [Node] or [Node2D]) breaks the sequence. See also [method Node.get_parent]. |
| 124 | [b]Note:[/b] This method cannot take [member VisualInstance3D.layers] into account, so even if this method returns [code]true[/code], the node may not be rendered. |
| 125 | </description> |
| 126 | </method> |
| 127 | <method name="look_at"> |
| 128 | <return type="void" /> |
| 129 | <param index="0" name="target" type="Vector3" /> |
| 130 | <param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> |
| 131 | <param index="2" name="use_model_front" type="bool" default="false" /> |
| 132 | <description> |
| 133 | Rotates the node so that the local forward axis (-Z, [constant Vector3.FORWARD]) points toward the [param target] position. This operation is calculated in global space (relative to the world). |
| 134 | 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. |
| 135 | The [param target] position cannot be the same as the node's position, the [param up] vector cannot be [constant Vector3.ZERO]. Furthermore, the direction from the node's position to the [param target] position cannot be parallel to the [param up] vector, to avoid an unintended rotation around the local Z axis. |
| 136 | If [param use_model_front] is [code]true[/code], the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). |
| 137 | [b]Note:[/b] This method fails if the node is not in the scene tree. If necessary, use [method look_at_from_position] instead. |
| 138 | </description> |
| 139 | </method> |
| 140 | <method name="look_at_from_position"> |
| 141 | <return type="void" /> |
| 142 | <param index="0" name="position" type="Vector3" /> |
| 143 | <param index="1" name="target" type="Vector3" /> |
| 144 | <param index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> |
| 145 | <param index="3" name="use_model_front" type="bool" default="false" /> |
| 146 | <description> |
| 147 | Moves the node to the specified [param position], then rotates the node to point toward the [param target] position, similar to [method look_at]. This operation is calculated in global space (relative to the world). |
| 148 | </description> |
| 149 | </method> |
| 150 | <method name="orthonormalize"> |
| 151 | <return type="void" /> |
| 152 | <description> |
| 153 | Orthonormalizes this node's [member basis]. This method sets this node's [member scale] to [constant Vector3.ONE] (or its negative counterpart), but preserves the [member position] and [member rotation]. See also [method Transform3D.orthonormalized]. |
| 154 | </description> |
| 155 | </method> |
| 156 | <method name="rotate"> |
| 157 | <return type="void" /> |
| 158 | <param index="0" name="axis" type="Vector3" /> |
| 159 | <param index="1" name="angle" type="float" /> |
| 160 | <description> |
| 161 | Rotates this node's [member basis] around the [param axis] by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position]. |
| 162 | </description> |
| 163 | </method> |
| 164 | <method name="rotate_object_local"> |
| 165 | <return type="void" /> |
| 166 | <param index="0" name="axis" type="Vector3" /> |
| 167 | <param index="1" name="angle" type="float" /> |
| 168 | <description> |
| 169 | Rotates this node's [member basis] around the [param axis] by the given [param angle], in radians. This operation is calculated in local space (relative to this node) and preserves the [member position]. |
| 170 | </description> |
| 171 | </method> |
| 172 | <method name="rotate_x"> |
| 173 | <return type="void" /> |
| 174 | <param index="0" name="angle" type="float" /> |
| 175 | <description> |
| 176 | Rotates this node's [member basis] around the X axis by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position]. |
| 177 | </description> |
| 178 | </method> |
| 179 | <method name="rotate_y"> |
| 180 | <return type="void" /> |
| 181 | <param index="0" name="angle" type="float" /> |
| 182 | <description> |
| 183 | Rotates this node's [member basis] around the Y axis by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position]. |
| 184 | </description> |
| 185 | </method> |
| 186 | <method name="rotate_z"> |
| 187 | <return type="void" /> |
| 188 | <param index="0" name="angle" type="float" /> |
| 189 | <description> |
| 190 | Rotates this node's [member basis] around the Z axis by the given [param angle], in radians. This operation is calculated in parent space (relative to the parent) and preserves the [member position]. |
| 191 | </description> |
| 192 | </method> |
| 193 | <method name="scale_object_local"> |
| 194 | <return type="void" /> |
| 195 | <param index="0" name="scale" type="Vector3" /> |
| 196 | <description> |
| 197 | Scales this node's [member basis] by the given [param scale] factor. This operation is calculated in local space (relative to this node) and preserves the [member position]. |
| 198 | </description> |
| 199 | </method> |
| 200 | <method name="set_disable_scale"> |
| 201 | <return type="void" /> |
| 202 | <param index="0" name="disable" type="bool" /> |
| 203 | <description> |
| 204 | If [code]true[/code], this node's [member global_transform] is automatically orthonormalized. This results in this node not appearing distorted, as if its global scale were set to [constant Vector3.ONE] (or its negative counterpart). See also [method is_scale_disabled] and [method orthonormalize]. |
| 205 | [b]Note:[/b] [member transform] is not affected by this setting. |
| 206 | </description> |
| 207 | </method> |
| 208 | <method name="set_identity"> |
| 209 | <return type="void" /> |
| 210 | <description> |
| 211 | Sets this node's [member transform] to [constant Transform3D.IDENTITY], which resets all transformations in parent space ([member position], [member rotation], and [member scale]). |
| 212 | </description> |
| 213 | </method> |
| 214 | <method name="set_ignore_transform_notification"> |
| 215 | <return type="void" /> |
| 216 | <param index="0" name="enabled" type="bool" /> |
| 217 | <description> |
| 218 | If [code]true[/code], the node will not receive [constant NOTIFICATION_TRANSFORM_CHANGED] or [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED]. |
| 219 | It may useful to call this method when handling these notifications to prevent infinite recursion. |
| 220 | </description> |
| 221 | </method> |
| 222 | <method name="set_notify_local_transform"> |
| 223 | <return type="void" /> |
| 224 | <param index="0" name="enable" type="bool" /> |
| 225 | <description> |
| 226 | If [code]true[/code], the node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] whenever [member transform] changes. |
| 227 | [b]Note:[/b] Some 3D nodes such as [CSGShape3D] or [CollisionShape3D] automatically enable this to function correctly. |
| 228 | </description> |
| 229 | </method> |
| 230 | <method name="set_notify_transform" keywords="set_notify_global_transform"> |
| 231 | <return type="void" /> |
| 232 | <param index="0" name="enable" type="bool" /> |
| 233 | <description> |
| 234 | If [code]true[/code], the node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] whenever [member global_transform] changes. |
| 235 | [b]Note:[/b] Most 3D nodes such as [VisualInstance3D] or [CollisionObject3D] automatically enable this to function correctly. |
| 236 | [b]Note:[/b] In the editor, nodes will propagate this notification to their children if a gizmo is attached (see [method add_gizmo]). |
| 237 | </description> |
| 238 | </method> |
| 239 | <method name="set_subgizmo_selection"> |
| 240 | <return type="void" /> |
| 241 | <param index="0" name="gizmo" type="Node3DGizmo" /> |
| 242 | <param index="1" name="id" type="int" /> |
| 243 | <param index="2" name="transform" type="Transform3D" /> |
| 244 | <description> |
| 245 | Selects the [param gizmo]'s subgizmo with the given [param id] and sets its transform. Only works in the editor. |
| 246 | [b]Note:[/b] The gizmo object would typically be an instance of [EditorNode3DGizmo], but the argument type is kept generic to avoid creating a dependency on editor classes in [Node3D]. |
| 247 | </description> |
| 248 | </method> |
| 249 | <method name="show"> |
| 250 | <return type="void" /> |
| 251 | <description> |
| 252 | Allows this node to be rendered. Equivalent to setting [member visible] to [code]true[/code]. This is the opposite of [method hide]. |
| 253 | </description> |
| 254 | </method> |
| 255 | <method name="to_global" qualifiers="const"> |
| 256 | <return type="Vector3" /> |
| 257 | <param index="0" name="local_point" type="Vector3" /> |
| 258 | <description> |
| 259 | Returns the [param local_point] converted from this node's local space to global space. This is the opposite of [method to_local]. |
| 260 | </description> |
| 261 | </method> |
| 262 | <method name="to_local" qualifiers="const"> |
| 263 | <return type="Vector3" /> |
| 264 | <param index="0" name="global_point" type="Vector3" /> |
| 265 | <description> |
| 266 | Returns the [param global_point] converted from global space to this node's local space. This is the opposite of [method to_global]. |
| 267 | </description> |
| 268 | </method> |
| 269 | <method name="translate"> |
| 270 | <return type="void" /> |
| 271 | <param index="0" name="offset" type="Vector3" /> |
| 272 | <description> |
| 273 | Adds the given translation [param offset] to the node's position, in local space (relative to this node). |
| 274 | [b]Note:[/b] Prefer using [method translate_object_local], instead, as this method may be changed in a future release. |
| 275 | [b]Note:[/b] Despite the naming convention, this operation is [b]not[/b] calculated in parent space for compatibility reasons. To translate in parent space, add [param offset] to the [member position] ([code]node_3d.position += offset[/code]). |
| 276 | </description> |
| 277 | </method> |
| 278 | <method name="translate_object_local" keywords="move_local"> |
| 279 | <return type="void" /> |
| 280 | <param index="0" name="offset" type="Vector3" /> |
| 281 | <description> |
| 282 | Adds the given translation [param offset] to the node's position, in local space (relative to this node). |
| 283 | </description> |
| 284 | </method> |
| 285 | <method name="update_gizmos"> |
| 286 | <return type="void" /> |
| 287 | <description> |
| 288 | Updates all the [EditorNode3DGizmo] objects attached to this node. Only works in the editor. |
| 289 | </description> |
| 290 | </method> |
| 291 | </methods> |
| 292 | <members> |
| 293 | <member name="basis" type="Basis" setter="set_basis" getter="get_basis"> |
| 294 | Basis of the [member transform] property. Represents the rotation, scale, and shear of this node in parent space (relative to the parent node). |
| 295 | </member> |
| 296 | <member name="global_basis" type="Basis" setter="set_global_basis" getter="get_global_basis"> |
| 297 | Basis of the [member global_transform] property. Represents the rotation, scale, and shear of this node in global space (relative to the world). |
| 298 | [b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Basis.IDENTITY]. |
| 299 | </member> |
| 300 | <member name="global_position" type="Vector3" setter="set_global_position" getter="get_global_position" keywords="global_translation"> |
| 301 | Global position (translation) of this node in global space (relative to the world). This is equivalent to the [member global_transform]'s [member Transform3D.origin]. |
| 302 | [b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Vector3.ZERO]. |
| 303 | </member> |
| 304 | <member name="global_rotation" type="Vector3" setter="set_global_rotation" getter="get_global_rotation"> |
| 305 | Global rotation of this node as [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians and in global space (relative to the world). This value is obtained from [member global_basis]'s rotation. |
| 306 | - The [member Vector3.x] is the angle around the global X axis (pitch); |
| 307 | - The [member Vector3.y] is the angle around the global Y axis (yaw); |
| 308 | - The [member Vector3.z] is the angle around the global Z axis (roll). |
| 309 | [b]Note:[/b] Unlike [member rotation], this property always follows the YXZ convention ([constant EULER_ORDER_YXZ]). |
| 310 | [b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Vector3.ZERO]. |
| 311 | </member> |
| 312 | <member name="global_rotation_degrees" type="Vector3" setter="set_global_rotation_degrees" getter="get_global_rotation_degrees"> |
| 313 | The [member global_rotation] of this node, in degrees instead of radians. |
| 314 | [b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Vector3.ZERO]. |
| 315 | </member> |
| 316 | <member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform"> |
| 317 | The transformation of this node, in global space (relative to the world). Contains and represents this node's [member global_position], [member global_rotation], and global scale. |
| 318 | [b]Note:[/b] If the node is not inside the tree, getting this property fails and returns [constant Transform3D.IDENTITY]. |
| 319 | </member> |
| 320 | <member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)" keywords="translation"> |
| 321 | Position (translation) of this node in parent space (relative to the parent node). This is equivalent to the [member transform]'s [member Transform3D.origin]. |
| 322 | </member> |
| 323 | <member name="quaternion" type="Quaternion" setter="set_quaternion" getter="get_quaternion"> |
| 324 | Rotation of this node represented as a [Quaternion] in parent space (relative to the parent node). This value is obtained from [member basis]'s rotation. |
| 325 | [b]Note:[/b] Quaternions are much more suitable for 3D math but are less intuitive. Setting this property can be useful for interpolation (see [method Quaternion.slerp]). |
| 326 | </member> |
| 327 | <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" default="Vector3(0, 0, 0)"> |
| 328 | Rotation of this node as [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians and in parent space (relative to the parent node). This value is obtained from [member basis]'s rotation. |
| 329 | - The [member Vector3.x] is the angle around the local X axis (pitch); |
| 330 | - The [member Vector3.y] is the angle around the local Y axis (yaw); |
| 331 | - The [member Vector3.z] is the angle around the local Z axis (roll). |
| 332 | The order of each consecutive rotation can be changed with [member rotation_order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]). |
| 333 | [b]Note:[/b] This property is edited in degrees in the inspector. If you want to use degrees in a script, use [member rotation_degrees]. |
| 334 | </member> |
| 335 | <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees"> |
| 336 | The [member rotation] of this node, in degrees instead of radians. |
| 337 | [b]Note:[/b] This is [b]not[/b] the property available in the Inspector dock. |
| 338 | </member> |
| 339 | <member name="rotation_edit_mode" type="int" setter="set_rotation_edit_mode" getter="get_rotation_edit_mode" enum="Node3D.RotationEditMode" default="0"> |
| 340 | How this node's rotation and scale are displayed in the Inspector dock. |
| 341 | </member> |
| 342 | <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="EulerOrder" default="2"> |
| 343 | The axis rotation order of the [member rotation] property. The final orientation is calculated by rotating around the local X, Y, and Z axis in this order. |
| 344 | </member> |
| 345 | <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)"> |
| 346 | Scale of this node in local space (relative to this node). This value is obtained from [member basis]'s scale. |
| 347 | [b]Note:[/b] The behavior of some 3D node types is not affected by this property. These include [Light3D], [Camera3D], [AudioStreamPlayer3D], and more. |
| 348 | [b]Warning:[/b] The scale's components must either be all positive or all negative, and [b]not[/b] exactly [code]0.0[/code]. Otherwise, it won't be possible to obtain the scale from the [member basis]. This may cause the intended scale to be lost when reloaded from disk, and potentially other unstable behavior. |
| 349 | </member> |
| 350 | <member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false"> |
| 351 | If [code]true[/code], the node does not inherit its transformations from its parent. As such, node transformations will only be in global space, which also means that [member global_transform] and [member transform] will be identical. |
| 352 | </member> |
| 353 | <member name="transform" type="Transform3D" setter="set_transform" getter="get_transform" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> |
| 354 | The local transformation of this node, in parent space (relative to the parent node). Contains and represents this node's [member position], [member rotation], and [member scale]. |
| 355 | </member> |
| 356 | <member name="visibility_parent" type="NodePath" setter="set_visibility_parent" getter="get_visibility_parent" default="NodePath("")"> |
| 357 | Path to the visibility range parent for this node and its descendants. The visibility parent must be a [GeometryInstance3D]. |
| 358 | Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own [member GeometryInstance3D.visibility_range_begin]. Nodes hidden via the [member Node3D.visible] property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden node or its descendants into account. |
| 359 | </member> |
| 360 | <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> |
| 361 | If [code]true[/code], this node can be visible. The node is only rendered when all of its ancestors are visible, as well. That means [method is_visible_in_tree] must return [code]true[/code]. |
| 362 | </member> |
| 363 | </members> |
| 364 | <signals> |
| 365 | <signal name="visibility_changed"> |
| 366 | <description> |
| 367 | Emitted when this node's visibility changes (see [member visible] and [method is_visible_in_tree]). |
| 368 | This signal is emitted [i]after[/i] the related [constant NOTIFICATION_VISIBILITY_CHANGED] notification. |
| 369 | </description> |
| 370 | </signal> |
| 371 | </signals> |
| 372 | <constants> |
| 373 | <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000" keywords="NOTIFICATION_GLOBAL_TRANSFORM_CHANGED"> |
| 374 | Notification received when this node's [member global_transform] changes, if [method is_transform_notification_enabled] is [code]true[/code]. See also [method set_notify_transform]. |
| 375 | [b]Note:[/b] Most 3D nodes such as [VisualInstance3D] or [CollisionObject3D] automatically enable this to function correctly. |
| 376 | [b]Note:[/b] In the editor, nodes will propagate this notification to their children if a gizmo is attached (see [method add_gizmo]). |
| 377 | </constant> |
| 378 | <constant name="NOTIFICATION_ENTER_WORLD" value="41"> |
| 379 | Notification received when this node is registered to a new [World3D] (see [method get_world_3d]). |
| 380 | </constant> |
| 381 | <constant name="NOTIFICATION_EXIT_WORLD" value="42"> |
| 382 | Notification received when this node is unregistered from the current [World3D] (see [method get_world_3d]). |
| 383 | This notification is sent in reversed order. |
| 384 | </constant> |
| 385 | <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43"> |
| 386 | Notification received when this node's visibility changes (see [member visible] and [method is_visible_in_tree]). |
| 387 | This notification is received [i]before[/i] the related [signal visibility_changed] signal. |
| 388 | </constant> |
| 389 | <constant name="NOTIFICATION_LOCAL_TRANSFORM_CHANGED" value="44"> |
| 390 | Notification received when this node's [member transform] changes, if [method is_local_transform_notification_enabled] is [code]true[/code]. This is not received when a parent [Node3D]'s [member transform] changes. See also [method set_notify_local_transform]. |
| 391 | [b]Note:[/b] Some 3D nodes such as [CSGShape3D] or [CollisionShape3D] automatically enable this to function correctly. |
| 392 | </constant> |
| 393 | <constant name="ROTATION_EDIT_MODE_EULER" value="0" enum="RotationEditMode"> |
| 394 | The rotation is edited using a [Vector3] in [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url]. |
| 395 | </constant> |
| 396 | <constant name="ROTATION_EDIT_MODE_QUATERNION" value="1" enum="RotationEditMode"> |
| 397 | The rotation is edited using a [Quaternion]. |
| 398 | </constant> |
| 399 | <constant name="ROTATION_EDIT_MODE_BASIS" value="2" enum="RotationEditMode"> |
| 400 | The rotation is edited using a [Basis]. In this mode, the raw [member basis]'s axes can be freely modified, but the [member scale] property is not available. |
| 401 | </constant> |
| 402 | </constants> |
| 403 | </class> |