Inheritance #

RefCounted

- AESContext
- AStar2D
- AStar3D
- AStarGrid2D
- AudioEffectInstance (1)
- AudioSample
- AudioSamplePlayback
- AudioStreamPlayback (5)
- CameraFeed
- CharFXTransform
- ConfigFile
- Crypto
- DTLSServer
- DirAccess
- ENetConnection
- EditorContextMenuPlugin
- EditorDebuggerPlugin
- EditorDebuggerSession
- EditorExportPlatform (6)
- EditorExportPlugin
- EditorExportPreset
- EditorFeatureProfile
- EditorFileSystemImportFormatSupportQuery
- EditorInspectorPlugin
- EditorResourceConversionPlugin
- EditorResourcePreviewGenerator
- EditorResourceTooltipPlugin
- EditorSceneFormatImporter (4)
- EditorScenePostImport
- EditorScenePostImportPlugin
- EditorScript
- EditorTranslationParserPlugin
- EncodedObjectAsID
- EngineProfiler
- Expression
- FileAccess
- GLTFObjectModelProperty
- HMACContext
- HTTPClient
- HashingContext
- ImageFormatLoader (1)
- JavaClass
- JavaObject
- JavaScriptObject
- KinematicCollision2D
- KinematicCollision3D
- Lightmapper (1)
- MeshConvexDecompositionSettings
- MeshDataTool
- MultiplayerAPI (2)
- Mutex
- NavigationPathQueryParameters2D
- NavigationPathQueryParameters3D
- NavigationPathQueryResult2D
- NavigationPathQueryResult3D
- Node3DGizmo (1)
- OggPacketSequencePlayback
- OpenXRAPIExtension
- PCKPacker
- PackedDataContainerRef
- PacketPeer (8)
- PhysicsPointQueryParameters2D
- PhysicsPointQueryParameters3D
- PhysicsRayQueryParameters2D
- PhysicsRayQueryParameters3D
- PhysicsShapeQueryParameters2D
- PhysicsShapeQueryParameters3D
- PhysicsTestMotionParameters2D
- PhysicsTestMotionParameters3D
- PhysicsTestMotionResult2D
- PhysicsTestMotionResult3D
- RDAttachmentFormat
- RDFramebufferPass
- RDPipelineColorBlendState
- RDPipelineColorBlendStateAttachment
- RDPipelineDepthStencilState
- RDPipelineMultisampleState
- RDPipelineRasterizationState
- RDPipelineSpecializationConstant
- RDSamplerState
- RDShaderSource
- RDTextureFormat
- RDTextureView
- RDUniform
- RDVertexAttribute
- RandomNumberGenerator
- RegEx
- RegExMatch
- RenderSceneBuffers (2)
- RenderSceneBuffersConfiguration
- Resource (103)
- ResourceFormatLoader
- ResourceFormatSaver
- ResourceImporter (16)
- SceneState
- SceneTreeTimer
- Semaphore
- SkinReference
- StreamPeer (5)
- SurfaceTool
- TCPServer
- TLSOptions
- TextLine
- TextParagraph
- TextServer (1)
- Thread
- TranslationDomain
- TriangleMesh
- Tween
- Tweener (5)
- UDPServer
- UPNP
- UPNPDevice
- WeakRef
- WebRTCPeerConnection (1)
- XMLParser
- XRInterface (4)
- XRPose
- XRTracker (2)
- ZIPPacker
- ZIPReader
Resource

- Animation
- AnimationLibrary
- AnimationNode (6)
- AnimationNodeStateMachinePlayback
- AnimationNodeStateMachineTransition
- AudioBusLayout
- AudioEffect (17)
- AudioStream (10)
- BitMap
- BoneMap
- ButtonGroup
- CameraAttributes (2)
- ColorPalette
- Compositor
- CompositorEffect
- CryptoKey
- Curve
- Curve2D
- Curve3D
- EditorNode3DGizmoPlugin
- EditorSettings
- Environment
- Font (3)
- GDExtension
- GLTFAccessor
- GLTFAnimation
- GLTFBufferView
- GLTFCamera
- GLTFDocument (1)
- GLTFDocumentExtension (1)
- GLTFLight
- GLTFMesh
- GLTFNode
- GLTFPhysicsBody
- GLTFPhysicsShape
- GLTFSkeleton
- GLTFSkin
- GLTFSpecGloss
- GLTFState (1)
- GLTFTexture
- GLTFTextureSampler
- Gradient
- Image
- ImporterMesh
- InputEvent (6)
- JSON
- LabelSettings
- LightmapGIData
- Material (9)
- Mesh (4)
- MeshLibrary
- MissingResource
- MultiMesh
- NavigationMesh
- NavigationMeshSourceGeometryData2D
- NavigationMeshSourceGeometryData3D
- NavigationPolygon
- Noise (1)
- Occluder3D (5)
- OccluderPolygon2D
- OggPacketSequence
- OpenXRAction
- OpenXRActionMap
- OpenXRActionSet
- OpenXRBindingModifier (2)
- OpenXRHapticBase (1)
- OpenXRIPBinding
- OpenXRInteractionProfile
- PackedDataContainer
- PackedScene
- PhysicsMaterial
- PolygonPathFinder
- RDShaderFile
- RDShaderSPIRV
- RichTextEffect
- SceneReplicationConfig
- Script (3)
- Shader (1)
- ShaderInclude
- Shape2D (8)
- Shape3D (9)
- Shortcut
- SkeletonModification2D (7)
- SkeletonModificationStack2D
- SkeletonProfile (1)
- Skin
- Sky
- SpriteFrames
- StyleBox (4)
- SyntaxHighlighter (2)
- Texture (3)
- Theme
- TileMapPattern
- TileSet
- TileSetSource (2)
- Translation (1)
- VideoStream (1)
- VideoStreamPlayback
- VisualShaderNode (62)
- VoxelGIData
- World2D
- World3D
- X509Certificate
AnimationNodeBlendSpace2D
Table of contents

AnimationNodeBlendSpace2D #

is_refcounted, is_instantiable, resource, core, not_builtin_classes

A set of AnimationRootNodes placed on 2D coordinates, crossfading between the three adjacent ones. Used by AnimationTree.

A resource used by AnimationNodeBlendTree.

AnimationNodeBlendSpace2D represents a virtual 2D space on which AnimationRootNodes are placed. Outputs the linear blend of the three adjacent animations using a Vector2 weight. Adjacent in this context means the three AnimationRootNodes making up the triangle that contains the current value.

You can add vertices to the blend space with add_blend_point and automatically triangulate it by setting auto_triangles to true. Otherwise, use add_triangle and remove_triangle to triangulate the blend space by hand.

Members #

var auto_triangles: bool = true#

If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with add_blend_point and remove_blend_point.

var blend_mode = BLEND_MODE_INTERPOLATED#

Controls the interpolation between animations. See BlendMode constants.

var max_space: Vector2 = Vector2(1, 1)#

The blend space's X and Y axes' upper limit for the points' position. See add_blend_point.

var min_space: Vector2 = Vector2(-1, -1)#

The blend space's X and Y axes' lower limit for the points' position. See add_blend_point.

var snap: Vector2 = Vector2(0.1, 0.1)#

Position increment to snap to when moving a point.

var sync: bool = false#

If false, the blended animations' frame are stopped when the blend value is 0.

If true, forcing the blended animations to advance frame.

var x_label: String = "x"#

Name of the blend space's X axis.

var y_label: String = "y"#

Name of the blend space's Y axis.

Methods #

func add_blend_point(at_index: int = -1) -> void#

Adds a new point that represents a node at the position set by pos. You can insert it at a specific index using the at_index argument. If you use the default value for at_index, the point is inserted at the end of the blend points array.

func add_triangle(at_index: int = -1) -> void#

Creates a new triangle using three points x, y, and z. Triangles can overlap. You can insert the triangle at a specific index using the at_index argument. If you use the default value for at_index, the point is inserted at the end of the blend points array.

const func get_blend_point_count() -> int#

Returns the number of points in the blend space.

const func get_blend_point_node(point: int) -> AnimationRootNode#

Returns the AnimationRootNode referenced by the point at index point.

const func get_blend_point_position(point: int) -> Vector2#

Returns the position of the point at index point.

const func get_triangle_count() -> int#

Returns the number of triangles in the blend space.

func get_triangle_point(point: int) -> int#

Returns the position of the point at index point in the triangle of index triangle.

func remove_blend_point(point: int) -> void#

Removes the point at index point from the blend space.

func remove_triangle(triangle: int) -> void#

Removes the triangle at index triangle from the blend space.

func set_blend_point_node(node: AnimationRootNode) -> void#

Changes the AnimationNode referenced by the point at index point.

func set_blend_point_position(pos: Vector2) -> void#

Updates the position of the point at index point in the blend space.

Annotations #

Constants #

const BLEND_MODE_INTERPOLATED = 0 enum BlendMode#

The interpolation between animations is linear.

const BLEND_MODE_DISCRETE = 1 enum BlendMode#

The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations.

const BLEND_MODE_DISCRETE_CARRY = 2 enum BlendMode#

Similar to BLEND_MODE_DISCRETE, but starts the new animation at the last animation's playback position.

Constructors #

Enums #

BlendMode#

enum BlendMode { BLEND_MODE_INTERPOLATED = 0, BLEND_MODE_DISCRETE = 1, BLEND_MODE_DISCRETE_CARRY = 2, }

Operators #

Signals #

signal triangles_updated()#

Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position.

Theme Items #

Tutorials #