mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Overhaul the top sections of the class reference (Animation classes)
This commit is contained in:
parent
e8f5d0f6e8
commit
4af3fc7e26
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Animation" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Contains data used to animate everything in the engine.
|
||||
Holds data that can be used to animate anything in the engine.
|
||||
</brief_description>
|
||||
<description>
|
||||
An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
|
||||
This resource holds data that can be used to animate anything in the engine. Animations are divided into tracks and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
# This creates an animation that makes the node "Enemy" move to the right by
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNode" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Base resource for [AnimationTree] nodes.
|
||||
Base class for [AnimationTree] nodes. Not related to scene nodes.
|
||||
</brief_description>
|
||||
<description>
|
||||
Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.
|
||||
Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="_get_caption" qualifiers="virtual const">
|
||||
|
@ -7,6 +7,6 @@
|
||||
A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
</class>
|
||||
|
@ -11,7 +11,7 @@
|
||||
- A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
</class>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeAnimation" inherits="AnimationRootNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Input animation to use in an [AnimationNodeBlendTree].
|
||||
An input animation for an [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together.
|
||||
A resource to add to an [AnimationNodeBlendTree]. Only has one output port using the [member animation] property. Used as an input for [AnimationNode]s that blend animations together.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
|
@ -7,7 +7,7 @@
|
||||
A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
|
@ -11,6 +11,6 @@
|
||||
- A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
</class>
|
||||
|
@ -1,16 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeBlendSpace1D" inherits="AnimationRootNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Blends linearly between two of any number of [AnimationNode] of any type placed on a virtual axis.
|
||||
A set of [AnimationRootNode]s placed on a virtual axis, crossfading between the two adjacent ones. Used by [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree].
|
||||
This is a virtual axis on which you can add any type of [AnimationNode] using [method add_blend_point].
|
||||
Outputs the linear blend of the two [AnimationNode]s closest to the node's current value.
|
||||
You can set the extents of the axis using the [member min_space] and [member max_space].
|
||||
A resource used by [AnimationNodeBlendTree].
|
||||
[AnimationNodeBlendSpace1D] represents a virtual axis on which any type of [AnimationRootNode]s can be added using [method add_blend_point]. Outputs the linear blend of the two [AnimationRootNode]s adjacent to the current value.
|
||||
You can set the extents of the axis with [member min_space] and [member max_space].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_blend_point">
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeBlendSpace2D" inherits="AnimationRootNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Blends linearly between three [AnimationNode] of any type placed in a 2D space.
|
||||
A set of [AnimationRootNode]s placed on 2D coordinates, crossfading between the three adjacent ones. Used by [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree].
|
||||
This node allows you to blend linearly between three animations using a [Vector2] weight.
|
||||
You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand.
|
||||
A resource used by [AnimationNodeBlendTree].
|
||||
[AnimationNodeBlendSpace1D] represents a virtual 2D space on which [AnimationRootNode]s are placed. Outputs the linear blend of the three adjacent animations using a [Vector2] weight. Adjacent in this context means the three [AnimationRootNode]s making up the triangle that contains the current value.
|
||||
You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to triangulate the blend space by hand.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
[AnimationTree] node resource that contains many blend type nodes.
|
||||
A sub-tree of blend type [AnimationNode]s used for complex animations. Used by [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
This node may contain a sub-tree of any other blend type nodes, such as [AnimationNodeTransition], [AnimationNodeBlend2], [AnimationNodeBlend3], [AnimationNodeOneShot], etc. This is one of the most commonly used roots.
|
||||
This node may contain a sub-tree of any other blend type nodes, such as [AnimationNodeTransition], [AnimationNodeBlend2], [AnimationNodeBlend3], [AnimationNodeOneShot], etc. This is one of the most commonly used animation node roots.
|
||||
An [AnimationNodeOutput] node named [code]output[/code] is created by default.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_node">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeOneShot" inherits="AnimationNodeSync" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Plays an animation once in [AnimationNodeBlendTree].
|
||||
Plays an animation once in an [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A resource to add to an [AnimationNodeBlendTree]. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters.
|
||||
@ -36,7 +36,7 @@
|
||||
[/codeblocks]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
<members>
|
||||
|
@ -1,12 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeOutput" inherits="AnimationNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Generic output node to be added to [AnimationNodeBlendTree].
|
||||
The animation output node of an [AnimationNodeBlendTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
A node created automatically in an [AnimationNodeBlendTree] that outputs the final animation.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeStateMachine" inherits="AnimationRootNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
State machine for control of animations.
|
||||
A state machine with multiple [AnimationRootNode]s, used by [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically.
|
||||
Contains multiple [AnimationRootNode]s representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically.
|
||||
[b]Example:[/b]
|
||||
[codeblocks]
|
||||
[gdscript]
|
||||
@ -18,7 +18,7 @@
|
||||
[/codeblocks]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="add_node">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeStateMachinePlayback" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Playback control for [AnimationNodeStateMachine].
|
||||
Provides playback control for an [AnimationNodeStateMachine].
|
||||
</brief_description>
|
||||
<description>
|
||||
Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code].
|
||||
@ -18,7 +18,7 @@
|
||||
[/codeblocks]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="get_current_length" qualifiers="const">
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeStateMachineTransition" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A resource to connect each node to make a path for [AnimationNodeStateMachine].
|
||||
A transition within an [AnimationNodeStateMachine] connecting two [AnimationRootNode]s.
|
||||
</brief_description>
|
||||
<description>
|
||||
The path generated when using [method AnimationNodeStateMachinePlayback.travel] is limited to the nodes connected by [AnimationNodeStateMachineTransition].
|
||||
You can set the timing and conditions of the transition in detail.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="advance_condition" type="StringName" setter="set_advance_condition" getter="get_advance_condition" default="&""">
|
||||
|
@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeSync" inherits="AnimationNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
The base class for [AnimationNode] which has more than two input ports and needs to synchronize them.
|
||||
Base class for [AnimationNode]s with more than two input ports that must be synchronized.
|
||||
</brief_description>
|
||||
<description>
|
||||
An animation node used to combine, mix, or blend two or more animations together while keeping them synchronized within an [AnimationTree].
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false">
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeTimeScale" inherits="AnimationNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A time-scaling animation node to be used with [AnimationTree].
|
||||
A time-scaling animation node used in [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation.
|
||||
Allows to scale the speed of the animation (or reverse it) in any children [AnimationNode]s. Setting it to [code]0.0[/code] will pause the animation.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
</tutorials>
|
||||
</class>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A time-seeking animation node to be used with [AnimationTree].
|
||||
A time-seeking animation node used in [AnimationTree].
|
||||
</brief_description>
|
||||
<description>
|
||||
This node can be used to cause a seek command to happen to any sub-children of the animation graph. Use this node type to play an [Animation] from the start or a certain playback position inside the [AnimationNodeBlendTree].
|
||||
@ -28,6 +28,6 @@
|
||||
[/codeblocks]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
</class>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationNodeTransition" inherits="AnimationNodeSync" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A generic animation transition node for [AnimationTree].
|
||||
A transition within an [AnimationTree] connecting two [AnimationNode]s.
|
||||
</brief_description>
|
||||
<description>
|
||||
Simple state machine for cases which don't require a more advanced [AnimationNodeStateMachine]. Animations can be connected to the inputs and transition times can be specified.
|
||||
@ -37,7 +37,7 @@
|
||||
[/codeblocks]
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/125</link>
|
||||
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
|
||||
</tutorials>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationPlayer" inherits="Node" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Player of [Animation] resources.
|
||||
A node used for animation playback.
|
||||
</brief_description>
|
||||
<description>
|
||||
An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of [AnimationLibrary] resources and custom blend times between animation transitions.
|
||||
An animation player is used for general-purpose playback of animations. It contains a dictionary of [AnimationLibrary] resources and custom blend times between animation transitions.
|
||||
Some methods and properties use a single key to reference an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation within the library, for example [code]"movement/run"[/code]. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library.
|
||||
[AnimationPlayer] is more suited than [Tween] for animations where you know the final values in advance. For example, fading a screen in and out is more easily done with an [AnimationPlayer] node thanks to the animation tools provided by the editor. That particular example can also be implemented with a [Tween], but it requires doing everything by code.
|
||||
Updating the target properties of animations occurs at process time.
|
||||
[AnimationPlayer] is better-suited than [Tween] for more complex animations, for example ones with non-trivial timings. It can also be used over [Tween] if the animation track editor is more convenient than doing it in code.
|
||||
Updating the target properties of animations occurs at the process frame.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="2D Sprite animation">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link>
|
||||
|
@ -1,10 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationRootNode" inherits="AnimationNode" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
The [AnimationNode] which can be set as the root of an [AnimationTree].
|
||||
Base class for [AnimationNode]s that hold one or multiple composite animations. Usually used for [member AnimationTree.tree_root].
|
||||
</brief_description>
|
||||
<description>
|
||||
[AnimationRootNode] is a base class for [AnimationNode]s that hold a complete animation. A complete animation refers to the output of an [AnimationNodeOutput] in an [AnimationNodeBlendTree] or the output of another [AnimationRootNode]. Used for [member AnimationTree.tree_root] or in other [AnimationRootNode]s.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
||||
</tutorials>
|
||||
</class>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="AnimationTree" inherits="Node" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A node to be used for advanced animation transitions in an [AnimationPlayer].
|
||||
A node used for advanced animation transitions in an [AnimationPlayer].
|
||||
</brief_description>
|
||||
<description>
|
||||
A node to be used for advanced animation transitions in an [AnimationPlayer].
|
||||
A node used for advanced animation transitions in an [AnimationPlayer].
|
||||
[b]Note:[/b] When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
|
||||
</description>
|
||||
<tutorials>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Bone2D" inherits="Node2D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Joint used with [Skeleton2D] to control and animate other nodes.
|
||||
A joint used with [Skeleton2D] to control and animate other nodes.
|
||||
</brief_description>
|
||||
<description>
|
||||
Use a hierarchy of [code]Bone2D[/code] bound to a [Skeleton2D] to control, and animate other [Node2D] nodes.
|
||||
You can use [code]Bone2D[/code] and [code]Skeleton2D[/code] nodes to animate 2D meshes created with the Polygon 2D UV editor.
|
||||
A hierarchy of [Bone2D]s can be bound to a [Skeleton2D] to control and animate other [Node2D] nodes.
|
||||
You can use [Bone2D] and [Skeleton2D] nodes to animate 2D meshes created with the [Polygon2D] UV editor.
|
||||
Each bone has a [member rest] transform that you can reset to with [method apply_rest]. These rest poses are relative to the bone's parent.
|
||||
If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses.
|
||||
</description>
|
||||
@ -21,14 +21,14 @@
|
||||
<method name="get_autocalculate_length_and_angle" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns whether this [code]Bone2D[/code] node is going to autocalculate its length and bone angle using its first [code]Bone2D[/code] child node, if one exists. If there are no [code]Bone2D[/code] children, then it cannot autocalculate these values and will print a warning.
|
||||
Returns whether this [Bone2D] is going to autocalculate its length and bone angle using its first [Bone2D] child node, if one exists. If there are no [Bone2D] children, then it cannot autocalculate these values and will print a warning.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_bone_angle" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the angle of the bone in the [code]Bone2D[/code] node.
|
||||
[b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node.
|
||||
Returns the angle of the bone in the [Bone2D].
|
||||
[b]Note:[/b] This is different from the [Bone2D]'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the [Bone2D]'s [member Node2D.transform].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_index_in_skeleton" qualifiers="const">
|
||||
@ -40,7 +40,7 @@
|
||||
<method name="get_length" qualifiers="const">
|
||||
<return type="float" />
|
||||
<description>
|
||||
Returns the length of the bone in the [code]Bone2D[/code] node.
|
||||
Returns the length of the bone in the [Bone2D] node.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_skeleton_rest" qualifiers="const">
|
||||
@ -53,22 +53,22 @@
|
||||
<return type="void" />
|
||||
<param index="0" name="auto_calculate" type="bool" />
|
||||
<description>
|
||||
When set to [code]true[/code], the [code]Bone2D[/code] node will attempt to automatically calculate the bone angle and length using the first child [code]Bone2D[/code] node, if one exists. If none exist, the [code]Bone2D[/code] cannot automatically calculate these values and will print a warning.
|
||||
When set to [code]true[/code], the [Bone2D] node will attempt to automatically calculate the bone angle and length using the first child [Bone2D] node, if one exists. If none exist, the [Bone2D] cannot automatically calculate these values and will print a warning.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_bone_angle">
|
||||
<return type="void" />
|
||||
<param index="0" name="angle" type="float" />
|
||||
<description>
|
||||
Sets the bone angle for the [code]Bone2D[/code] node. This is typically set to the rotation from the [code]Bone2D[/code] node to a child [code]Bone2D[/code] node.
|
||||
[b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node.
|
||||
Sets the bone angle for the [Bone2D]. This is typically set to the rotation from the [Bone2D] to a child [Bone2D] node.
|
||||
[b]Note:[/b] [b]Note:[/b] This is different from the [Bone2D]'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the [Bone2D]'s [member Node2D.transform].
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_length">
|
||||
<return type="void" />
|
||||
<param index="0" name="length" type="float" />
|
||||
<description>
|
||||
Sets the length of the bone in the [code]Bone2D[/code] node.
|
||||
Sets the length of the bone in the [Bone2D].
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="BoneAttachment3D" inherits="Node3D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A node that will attach to a bone.
|
||||
А node that dynamically copies or overrides the 3D transform of a bone in its parent [Skeleton3D].
|
||||
</brief_description>
|
||||
<description>
|
||||
This node will allow you to select a bone for this node to attach to. The BoneAttachment3D node can copy the transform of the select bone, or can override the transform of the selected bone.
|
||||
The BoneAttachment3D node must either be a child of a [Skeleton3D] node or be given an external [Skeleton3D] to use in order to function properly.
|
||||
This node selects a bone in a [Skeleton3D] and attaches to it. This means that the [BoneAttachment3D] node will either dynamically copy or override the 3D transform of the selected bone.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="BoneMap" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Bone map for retargeting.
|
||||
Describes a mapping of bone names for retargeting [Skeleton3D] into common names defined by a [SkeletonProfile].
|
||||
</brief_description>
|
||||
<description>
|
||||
This class contains a hashmap that uses a list of bone names in [SkeletonProfile] as key names.
|
||||
This class contains a dictionary that uses a list of bone names in [SkeletonProfile] as key names.
|
||||
By assigning the actual [Skeleton3D] bone name as the key value, it maps the [Skeleton3D] to the [SkeletonProfile].
|
||||
</description>
|
||||
<tutorials>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="PhysicalBone2D" inherits="RigidBody2D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A 2D node that can be used for physically aware bones in 2D.
|
||||
A [RigidBody2D]-derived node used to make [Bone2D]s in a [Skeleton2D] react to physics.
|
||||
</brief_description>
|
||||
<description>
|
||||
The [code]PhysicalBone2D[/code] node is a [RigidBody2D]-based node that can be used to make [Bone2D] nodes in a [Skeleton2D] react to physics. This node is very similar to the [PhysicalBone3D] node, just for 2D instead of 3D.
|
||||
[b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes.
|
||||
[b]Note:[/b] The PhysicalBone2D node does not automatically create a [Joint2D] node to keep [code]PhysicalBone2D[/code] nodes together. You will need to create these manually. For most cases, you want to use a [PinJoint2D] node. The [code]PhysicalBone2D[/code] node can automatically configure the [Joint2D] node once it's been created as a child node.
|
||||
The [PhysicalBone2D] node is a [RigidBody2D]-based node that can be used to make [Bone2D]s in a [Skeleton2D] react to physics.
|
||||
[b]Note:[/b] To make the [Bone2D]s visually follow the [PhysicalBone2D] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] parent.
|
||||
[b]Note:[/b] The [PhysicalBone2D] node does not automatically create a [Joint2D] node to keep [PhysicalBone2D] nodes together. They must be created manually. For most cases, you want to use a [PinJoint2D] node. The [PhysicalBone2D] node will automatically configure the [Joint2D] node once it's been added as a child node.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
@ -14,32 +14,32 @@
|
||||
<method name="get_joint" qualifiers="const">
|
||||
<return type="Joint2D" />
|
||||
<description>
|
||||
Returns the first [Joint2D] child node, if one exists. This is mainly a helper function to make it easier to get the [Joint2D] that the [code]PhysicalBone2D[/code] is autoconfiguring.
|
||||
Returns the first [Joint2D] child node, if one exists. This is mainly a helper function to make it easier to get the [Joint2D] that the [PhysicalBone2D] is autoconfiguring.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_simulating_physics" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns a boolean that indicates whether the [code]PhysicalBone2D[/code] node is running and simulating using the Godot 2D physics engine. When [code]true[/code], the PhysicalBone2D node is using physics.
|
||||
Returns a boolean that indicates whether the [PhysicalBone2D] is running and simulating using the Godot 2D physics engine. When [code]true[/code], the PhysicalBone2D node is using physics.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<members>
|
||||
<member name="auto_configure_joint" type="bool" setter="set_auto_configure_joint" getter="get_auto_configure_joint" default="true">
|
||||
If [code]true[/code], the [code]PhysicalBone2D[/code] node will automatically configure the first [Joint2D] child node. The automatic configuration is limited to setting up the node properties and positioning the [Joint2D].
|
||||
If [code]true[/code], the [PhysicalBone2D] will automatically configure the first [Joint2D] child node. The automatic configuration is limited to setting up the node properties and positioning the [Joint2D].
|
||||
</member>
|
||||
<member name="bone2d_index" type="int" setter="set_bone2d_index" getter="get_bone2d_index" default="-1">
|
||||
The index of the [Bone2D] node that this [code]PhysicalBone2D[/code] node is supposed to be simulating.
|
||||
The index of the [Bone2D] that this [PhysicalBone2D] should simulate.
|
||||
</member>
|
||||
<member name="bone2d_nodepath" type="NodePath" setter="set_bone2d_nodepath" getter="get_bone2d_nodepath" default="NodePath("")">
|
||||
The [NodePath] to the [Bone2D] node that this [code]PhysicalBone2D[/code] node is supposed to be simulating.
|
||||
The [NodePath] to the [Bone2D] that this [PhysicalBone2D] isshould simulate.
|
||||
</member>
|
||||
<member name="follow_bone_when_simulating" type="bool" setter="set_follow_bone_when_simulating" getter="get_follow_bone_when_simulating" default="false">
|
||||
If [code]true[/code], the [code]PhysicalBone2D[/code] will keep the transform of the bone it is bound to when simulating physics.
|
||||
If [code]true[/code], the [PhysicalBone2D] will keep the transform of the bone it is bound to when simulating physics.
|
||||
</member>
|
||||
<member name="simulate_physics" type="bool" setter="set_simulate_physics" getter="get_simulate_physics" default="false">
|
||||
If [code]true[/code], the [code]PhysicalBone2D[/code] will start simulating using physics. If [code]false[/code], the [code]PhysicalBone2D[/code] will follow the transform of the [Bone2D] node.
|
||||
[b]Note:[/b] To have the Bone2D nodes visually follow the [code]PhysicalBone2D[/code] node, use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes.
|
||||
If [code]true[/code], the [PhysicalBone2D] will start simulating using physics. If [code]false[/code], the [PhysicalBone2D] will follow the transform of the [Bone2D] node.
|
||||
[b]Note:[/b] To have the [Bone2D]s visually follow the [PhysicalBone2D], use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="PhysicalBone3D" inherits="PhysicsBody3D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A physics body used to make bones in a [Skeleton3D] react to physics.
|
||||
</brief_description>
|
||||
<description>
|
||||
[b]Warning:[/b] With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead.
|
||||
The [PhysicalBone3D] node is a physics body that can be used to make bones in a [Skeleton3D] react to physics.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Skeleton2D" inherits="Node2D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Skeleton for 2D characters and animated objects.
|
||||
The parent of a hierarchy of [Bone2D]s, used to create a 2D skeletal animation.
|
||||
</brief_description>
|
||||
<description>
|
||||
Skeleton2D parents a hierarchy of [Bone2D] objects. It is a requirement of [Bone2D]. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones.
|
||||
To setup different types of inverse kinematics for the given Skeleton2D, a [SkeletonModificationStack2D] should be created. They can be applied by creating the desired number of modifications, which can be done by increasing [member SkeletonModificationStack2D.modification_count].
|
||||
[Skeleton2D] parents a hierarchy of [Bone2D] nodes. It holds a reference to each [Bone2D]'s rest pose and acts as a single point of access to its bones.
|
||||
To set up different types of inverse kinematics for the given Skeleton2D, a [SkeletonModificationStack2D] should be created. The inverse kinematics be applied by increasing [member SkeletonModificationStack2D.modification_count] and creating the desired number of modifications.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="2D skeletons">$DOCS_URL/tutorials/animation/2d_skeletons.html</link>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="Skeleton3D" inherits="Node3D" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Skeleton for characters and animated objects.
|
||||
A node containing a bone hierarchy, used to create a 3D skeletal animation.
|
||||
</brief_description>
|
||||
<description>
|
||||
Skeleton3D provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). It can also use ragdoll physics.
|
||||
[Skeleton3D] provides an interface for managing a hierarchy of bones, including pose, rest and animation (see [Animation]). It can also use ragdoll physics.
|
||||
The overall transform of a bone with respect to the skeleton is determined by the following hierarchical order: rest pose, custom pose and pose.
|
||||
Note that "global pose" below refers to the overall transform of the bone with respect to skeleton, so it not the actual global/world transform of the bone.
|
||||
To setup different types of inverse kinematics, consider using [SkeletonIK3D], or add a custom IK implementation in [method Node._process] as a child node.
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="SkeletonIK3D" inherits="Node" is_deprecated="true" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
SkeletonIK3D is used to place the end bone of a [Skeleton3D] bone chain at a certain point in 3D by rotating all bones in the chain accordingly.
|
||||
A node used to rotate all bones of a [Skeleton3D] bone chain a way that places the end bone at a desired 3D position.
|
||||
</brief_description>
|
||||
<description>
|
||||
SkeletonIK3D is used to place the end bone of a [Skeleton3D] bone chain at a certain point in 3D by rotating all bones in the chain accordingly. A typical scenario for IK in games is to place a characters feet on the ground or a characters hands on a currently hold object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the [Skeleton3D] [code]bones_global_pose_override[/code] property for all affected bones in the chain. If fully applied this overwrites any bone transform from [Animation]s or bone custom poses set by users. The applied amount can be controlled with the [member interpolation] property.
|
||||
SkeletonIK3D is used to rotate all bones of a [Skeleton3D] bone chain a way that places the end bone at a desired 3D position. A typical scenario for IK in games is to place a character's feet on the ground or a character's hands on a currently held object. SkeletonIK uses FabrikInverseKinematic internally to solve the bone chain and applies the results to the [Skeleton3D] [code]bones_global_pose_override[/code] property for all affected bones in the chain. If fully applied, this overwrites any bone transform from [Animation]s or bone custom poses set by users. The applied amount can be controlled with the [member interpolation] property.
|
||||
[codeblock]
|
||||
# Apply IK effect automatically on every new frame (not the current)
|
||||
skeleton_ik_node.start()
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="SkeletonModification2D" inherits="Resource" is_experimental="true" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A resource that operates on [Bone2D] nodes in a [Skeleton2D].
|
||||
Base class for resources that operate on [Bone2D]s in a [Skeleton2D].
|
||||
</brief_description>
|
||||
<description>
|
||||
This resource provides an interface that can be expanded so code that operates on [Bone2D] nodes in a [Skeleton2D] can be mixed and matched together to create complex interactions.
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="SkeletonModification2DTwoBoneIK" inherits="SkeletonModification2D" is_experimental="true" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A modification that rotates two bones using the law of cosigns to reach the target.
|
||||
A modification that rotates two bones using the law of cosines to reach the target.
|
||||
</brief_description>
|
||||
<description>
|
||||
This [SkeletonModification2D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only operate on two bones.
|
||||
This [SkeletonModification2D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosines and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only operate on two bones.
|
||||
TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification2DFABRIK], but gives similar, natural looking results.
|
||||
</description>
|
||||
<tutorials>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="SkeletonProfile" inherits="Resource" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
Profile of a virtual skeleton used as a target for retargeting.
|
||||
Base class for a profile of a virtual skeleton used as a target for retargeting.
|
||||
</brief_description>
|
||||
<description>
|
||||
This resource is used in [EditorScenePostImport]. Some parameters are referring to bones in [Skeleton3D], [Skin], [Animation], and some other nodes are rewritten based on the parameters of [SkeletonProfile].
|
||||
|
Loading…
Reference in New Issue
Block a user