class_spatial - dragonsoulz/godot GitHub Wiki

Spatial

####Inherits: Node ####Category: Core

Brief Description

Base class for all 3D nodes.

Member Functions

Signals

  • visibility_changed ( )

Numeric Constants

  • NOTIFICATION_TRANSFORM_CHANGED = 29 - Spatial nodes receive this notifacation with their global transform changes. This means that either the current or a parent node changed it's transform.
  • NOTIFICATION_ENTER_WORLD = 41
  • NOTIFICATION_EXIT_WORLD = 42
  • NOTIFICATION_VISIBILITY_CHANGED = 43

Description

Spatial is the base for every type of 3D Node. It contains a 3D Transform which can be set or get as local or global. If a Spatial Node has Spatial children, their transforms will be relative to the parent.

Member Function Description

set_transform

Set the transform locally, relative to the parent spatial node.

get_transform

Return the local transform, relative to the bone parent.

set_global_transform

  • void set_global_transform ( Transform global )

Set the transform globally, relative to worldspace.

get_global_transform

Return the gloal transform, relative to worldspace.

get_parent_spatial

  • Object get_parent_spatial ( ) const

Return the parent Spatial, or an empty Object if no parent exists or parent is not of type [Spatial.