mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
classref: Sync with current master branch (2210111)
This commit is contained in:
@@ -88,79 +88,79 @@ Methods
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_gizmo<class_Node3D_method_add_gizmo>` **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_gizmos<class_Node3D_method_clear_gizmos>` **(** **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_subgizmo_selection<class_Node3D_method_clear_subgizmo_selection>` **(** **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`force_update_transform<class_Node3D_method_force_update_transform>` **(** **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Node3DGizmo[]<class_Node3DGizmo>` | :ref:`get_gizmos<class_Node3D_method_get_gizmos>` **(** **)** |const| |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Node3D<class_Node3D>` | :ref:`get_parent_node_3d<class_Node3D_method_get_parent_node_3d>` **(** **)** |const| |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`World3D<class_World3D>` | :ref:`get_world_3d<class_Node3D_method_get_world_3d>` **(** **)** |const| |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`global_rotate<class_Node3D_method_global_rotate>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`global_scale<class_Node3D_method_global_scale>` **(** :ref:`Vector3<class_Vector3>` scale **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`global_translate<class_Node3D_method_global_translate>` **(** :ref:`Vector3<class_Vector3>` offset **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`hide<class_Node3D_method_hide>` **(** **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_local_transform_notification_enabled<class_Node3D_method_is_local_transform_notification_enabled>` **(** **)** |const| |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_scale_disabled<class_Node3D_method_is_scale_disabled>` **(** **)** |const| |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_transform_notification_enabled<class_Node3D_method_is_transform_notification_enabled>` **(** **)** |const| |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_Node3D_method_is_visible_in_tree>` **(** **)** |const| |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`look_at<class_Node3D_method_look_at>` **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`look_at_from_position<class_Node3D_method_look_at_from_position>` **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`orthonormalize<class_Node3D_method_orthonormalize>` **(** **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate<class_Node3D_method_rotate>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate_object_local<class_Node3D_method_rotate_object_local>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate_x<class_Node3D_method_rotate_x>` **(** :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate_y<class_Node3D_method_rotate_y>` **(** :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate_z<class_Node3D_method_rotate_z>` **(** :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`scale_object_local<class_Node3D_method_scale_object_local>` **(** :ref:`Vector3<class_Vector3>` scale **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_disable_scale<class_Node3D_method_set_disable_scale>` **(** :ref:`bool<class_bool>` disable **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_identity<class_Node3D_method_set_identity>` **(** **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ignore_transform_notification<class_Node3D_method_set_ignore_transform_notification>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_notify_local_transform<class_Node3D_method_set_notify_local_transform>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_notify_transform<class_Node3D_method_set_notify_transform>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_subgizmo_selection<class_Node3D_method_set_subgizmo_selection>` **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo, :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`show<class_Node3D_method_show>` **(** **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`to_global<class_Node3D_method_to_global>` **(** :ref:`Vector3<class_Vector3>` local_point **)** |const| |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`to_local<class_Node3D_method_to_local>` **(** :ref:`Vector3<class_Vector3>` global_point **)** |const| |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`translate<class_Node3D_method_translate>` **(** :ref:`Vector3<class_Vector3>` offset **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`translate_object_local<class_Node3D_method_translate_object_local>` **(** :ref:`Vector3<class_Vector3>` offset **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update_gizmos<class_Node3D_method_update_gizmos>` **(** **)** |
|
||||
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_gizmo<class_Node3D_method_add_gizmo>` **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_gizmos<class_Node3D_method_clear_gizmos>` **(** **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`clear_subgizmo_selection<class_Node3D_method_clear_subgizmo_selection>` **(** **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`force_update_transform<class_Node3D_method_force_update_transform>` **(** **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Node3DGizmo[]<class_Node3DGizmo>` | :ref:`get_gizmos<class_Node3D_method_get_gizmos>` **(** **)** |const| |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Node3D<class_Node3D>` | :ref:`get_parent_node_3d<class_Node3D_method_get_parent_node_3d>` **(** **)** |const| |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`World3D<class_World3D>` | :ref:`get_world_3d<class_Node3D_method_get_world_3d>` **(** **)** |const| |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`global_rotate<class_Node3D_method_global_rotate>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`global_scale<class_Node3D_method_global_scale>` **(** :ref:`Vector3<class_Vector3>` scale **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`global_translate<class_Node3D_method_global_translate>` **(** :ref:`Vector3<class_Vector3>` offset **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`hide<class_Node3D_method_hide>` **(** **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_local_transform_notification_enabled<class_Node3D_method_is_local_transform_notification_enabled>` **(** **)** |const| |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_scale_disabled<class_Node3D_method_is_scale_disabled>` **(** **)** |const| |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_transform_notification_enabled<class_Node3D_method_is_transform_notification_enabled>` **(** **)** |const| |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_visible_in_tree<class_Node3D_method_is_visible_in_tree>` **(** **)** |const| |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`look_at<class_Node3D_method_look_at>` **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`look_at_from_position<class_Node3D_method_look_at_from_position>` **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`orthonormalize<class_Node3D_method_orthonormalize>` **(** **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate<class_Node3D_method_rotate>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate_object_local<class_Node3D_method_rotate_object_local>` **(** :ref:`Vector3<class_Vector3>` axis, :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate_x<class_Node3D_method_rotate_x>` **(** :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate_y<class_Node3D_method_rotate_y>` **(** :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`rotate_z<class_Node3D_method_rotate_z>` **(** :ref:`float<class_float>` angle **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`scale_object_local<class_Node3D_method_scale_object_local>` **(** :ref:`Vector3<class_Vector3>` scale **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_disable_scale<class_Node3D_method_set_disable_scale>` **(** :ref:`bool<class_bool>` disable **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_identity<class_Node3D_method_set_identity>` **(** **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_ignore_transform_notification<class_Node3D_method_set_ignore_transform_notification>` **(** :ref:`bool<class_bool>` enabled **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_notify_local_transform<class_Node3D_method_set_notify_local_transform>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_notify_transform<class_Node3D_method_set_notify_transform>` **(** :ref:`bool<class_bool>` enable **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_subgizmo_selection<class_Node3D_method_set_subgizmo_selection>` **(** :ref:`Node3DGizmo<class_Node3DGizmo>` gizmo, :ref:`int<class_int>` id, :ref:`Transform3D<class_Transform3D>` transform **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`show<class_Node3D_method_show>` **(** **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`to_global<class_Node3D_method_to_global>` **(** :ref:`Vector3<class_Vector3>` local_point **)** |const| |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`to_local<class_Node3D_method_to_local>` **(** :ref:`Vector3<class_Vector3>` global_point **)** |const| |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`translate<class_Node3D_method_translate>` **(** :ref:`Vector3<class_Vector3>` offset **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`translate_object_local<class_Node3D_method_translate_object_local>` **(** :ref:`Vector3<class_Vector3>` offset **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`update_gizmos<class_Node3D_method_update_gizmos>` **(** **)** |
|
||||
+-----------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -751,9 +751,9 @@ Returns ``true`` if the node is present in the :ref:`SceneTree<class_SceneTree>`
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **look_at** **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)**
|
||||
void **look_at** **(** :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)**
|
||||
|
||||
Rotates the node so that the local forward axis (-Z) points toward the ``target`` position.
|
||||
Rotates the node so that the local forward axis (-Z, :ref:`Vector3.FORWARD<class_Vector3_constant_FORWARD>`) points toward the ``target`` position.
|
||||
|
||||
The local up axis (+Y) points as close to the ``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.
|
||||
|
||||
@@ -761,6 +761,8 @@ The ``target`` position cannot be the same as the node's position, the ``up`` ve
|
||||
|
||||
Operations take place in global space, which means that the node must be in the scene tree.
|
||||
|
||||
If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the ``target`` position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right).
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
@@ -769,7 +771,7 @@ Operations take place in global space, which means that the node must be in the
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **look_at_from_position** **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0) **)**
|
||||
void **look_at_from_position** **(** :ref:`Vector3<class_Vector3>` position, :ref:`Vector3<class_Vector3>` target, :ref:`Vector3<class_Vector3>` up=Vector3(0, 1, 0), :ref:`bool<class_bool>` use_model_front=false **)**
|
||||
|
||||
Moves the node to the specified ``position``, and then rotates the node to point toward the ``target`` as per :ref:`look_at<class_Node3D_method_look_at>`. Operations take place in global space.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user