.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_Spatial: Spatial ======= **Inherits:** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`Joint`, :ref:`RayCast`, :ref:`Camera`, :ref:`BoneAttachment`, :ref:`CollisionShape`, :ref:`Path`, :ref:`VisualInstance`, :ref:`VehicleWheel`, :ref:`Position3D`, :ref:`ProximityGroup`, :ref:`SpatialPlayer`, :ref:`WorldEnvironment`, :ref:`PathFollow`, :ref:`NavigationMeshInstance`, :ref:`Listener`, :ref:`InverseKinematics`, :ref:`VisibilityNotifier`, :ref:`Navigation`, :ref:`CollisionPolygon`, :ref:`GridMap`, :ref:`Skeleton`, :ref:`CollisionObject` **Category:** Core Brief Description ----------------- Base class for all 3D nodes. Member Functions ---------------- +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`SpatialGizmo` | :ref:`get_gizmo` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`get_global_transform` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Object` | :ref:`get_parent_spatial` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_rotation` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_rotation_deg` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_scale` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform` | :ref:`get_transform` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector3` | :ref:`get_translation` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`World` | :ref:`get_world` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_rotate` **(** :ref:`Vector3` normal, :ref:`float` radians **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`global_translate` **(** :ref:`Vector3` offset **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`hide` **(** **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_hidden` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_local_transform_notification_enabled` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_set_as_toplevel` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_visible` **(** **)** const | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`look_at` **(** :ref:`Vector3` target, :ref:`Vector3` up **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`look_at_from_pos` **(** :ref:`Vector3` pos, :ref:`Vector3` target, :ref:`Vector3` up **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`orthonormalize` **(** **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`rotate` **(** :ref:`Vector3` normal, :ref:`float` radians **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`rotate_x` **(** :ref:`float` radians **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`rotate_y` **(** :ref:`float` radians **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`rotate_z` **(** :ref:`float` radians **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_as_toplevel` **(** :ref:`bool` enable **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_gizmo` **(** :ref:`SpatialGizmo` gizmo **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_global_transform` **(** :ref:`Transform` global **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_hidden` **(** :ref:`bool` hidden **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_identity` **(** **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_ignore_transform_notification` **(** :ref:`bool` enabled **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_rotation` **(** :ref:`Vector3` rotation_rad **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_rotation_deg` **(** :ref:`Vector3` rotation_deg **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_scale` **(** :ref:`Vector3` scale **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_transform` **(** :ref:`Transform` local **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_translation` **(** :ref:`Vector3` translation **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`show` **(** **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`translate` **(** :ref:`Vector3` offset **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`update_gizmo` **(** **)** | +------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Signals ------- - **visibility_changed** **(** **)** Numeric Constants ----------------- - **NOTIFICATION_TRANSFORM_CHANGED** = **29** --- Spatial nodes receive this notification with their global transform changes. This means that either the current or a parent node changed its transform. - **NOTIFICATION_ENTER_WORLD** = **41** - **NOTIFICATION_EXIT_WORLD** = **42** - **NOTIFICATION_VISIBILITY_CHANGED** = **43** Description ----------- Spatial is the base for every type of 3D :ref:`Node`. It contains a 3D :ref:`Transform` which can be set or get as local or global. If a Spatial :ref:`Node` has Spatial children, their transforms will be relative to the parent. Member Function Description --------------------------- .. _class_Spatial_get_gizmo: - :ref:`SpatialGizmo` **get_gizmo** **(** **)** const .. _class_Spatial_get_global_transform: - :ref:`Transform` **get_global_transform** **(** **)** const Return the global transform, relative to worldspace. .. _class_Spatial_get_parent_spatial: - :ref:`Object` **get_parent_spatial** **(** **)** const Return the parent :ref:`Spatial`, or an empty :ref:`Object` if no parent exists or parent is not of type :ref:`Spatial`. .. _class_Spatial_get_rotation: - :ref:`Vector3` **get_rotation** **(** **)** const .. _class_Spatial_get_rotation_deg: - :ref:`Vector3` **get_rotation_deg** **(** **)** const .. _class_Spatial_get_scale: - :ref:`Vector3` **get_scale** **(** **)** const .. _class_Spatial_get_transform: - :ref:`Transform` **get_transform** **(** **)** const Return the local transform, relative to the bone parent. .. _class_Spatial_get_translation: - :ref:`Vector3` **get_translation** **(** **)** const .. _class_Spatial_get_world: - :ref:`World` **get_world** **(** **)** const .. _class_Spatial_global_rotate: - void **global_rotate** **(** :ref:`Vector3` normal, :ref:`float` radians **)** .. _class_Spatial_global_translate: - void **global_translate** **(** :ref:`Vector3` offset **)** .. _class_Spatial_hide: - void **hide** **(** **)** .. _class_Spatial_is_hidden: - :ref:`bool` **is_hidden** **(** **)** const .. _class_Spatial_is_local_transform_notification_enabled: - :ref:`bool` **is_local_transform_notification_enabled** **(** **)** const .. _class_Spatial_is_set_as_toplevel: - :ref:`bool` **is_set_as_toplevel** **(** **)** const .. _class_Spatial_is_visible: - :ref:`bool` **is_visible** **(** **)** const .. _class_Spatial_look_at: - void **look_at** **(** :ref:`Vector3` target, :ref:`Vector3` up **)** .. _class_Spatial_look_at_from_pos: - void **look_at_from_pos** **(** :ref:`Vector3` pos, :ref:`Vector3` target, :ref:`Vector3` up **)** .. _class_Spatial_orthonormalize: - void **orthonormalize** **(** **)** .. _class_Spatial_rotate: - void **rotate** **(** :ref:`Vector3` normal, :ref:`float` radians **)** .. _class_Spatial_rotate_x: - void **rotate_x** **(** :ref:`float` radians **)** .. _class_Spatial_rotate_y: - void **rotate_y** **(** :ref:`float` radians **)** .. _class_Spatial_rotate_z: - void **rotate_z** **(** :ref:`float` radians **)** .. _class_Spatial_set_as_toplevel: - void **set_as_toplevel** **(** :ref:`bool` enable **)** .. _class_Spatial_set_gizmo: - void **set_gizmo** **(** :ref:`SpatialGizmo` gizmo **)** .. _class_Spatial_set_global_transform: - void **set_global_transform** **(** :ref:`Transform` global **)** Set the transform globally, relative to worldspace. .. _class_Spatial_set_hidden: - void **set_hidden** **(** :ref:`bool` hidden **)** .. _class_Spatial_set_identity: - void **set_identity** **(** **)** .. _class_Spatial_set_ignore_transform_notification: - void **set_ignore_transform_notification** **(** :ref:`bool` enabled **)** .. _class_Spatial_set_notify_local_transform: - void **set_notify_local_transform** **(** :ref:`bool` enable **)** .. _class_Spatial_set_rotation: - void **set_rotation** **(** :ref:`Vector3` rotation_rad **)** .. _class_Spatial_set_rotation_deg: - void **set_rotation_deg** **(** :ref:`Vector3` rotation_deg **)** .. _class_Spatial_set_scale: - void **set_scale** **(** :ref:`Vector3` scale **)** .. _class_Spatial_set_transform: - void **set_transform** **(** :ref:`Transform` local **)** Set the transform locally, relative to the parent spatial node. .. _class_Spatial_set_translation: - void **set_translation** **(** :ref:`Vector3` translation **)** .. _class_Spatial_show: - void **show** **(** **)** .. _class_Spatial_translate: - void **translate** **(** :ref:`Vector3` offset **)** .. _class_Spatial_update_gizmo: - void **update_gizmo** **(** **)**