Files
godot-docs-l10n/sphinx/templates/getting_started/first_3d_game/09.adding_animations.pot
2022-09-09 16:05:06 +02:00

453 lines
18 KiB
Plaintext

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2014-2022, Juan Linietsky, Ariel Manzur and the Godot community (CC-BY 3.0)
# This file is distributed under the same license as the Godot Engine package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine 3.5\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-09-09 16:03+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:4
msgid "Character animation"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:6
msgid "In this final lesson, we'll use Godot's built-in animation tools to make our characters float and flap. You'll learn to design animations in the editor and use code to make your game feel alive."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:10
msgid "|image0|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:534
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:534
msgid "image0"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:12
msgid "We'll start with an introduction to using the animation editor."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:15
msgid "Using the animation editor"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:17
msgid "The engine comes with tools to author animations in the editor. You can then use the code to play and control them at runtime."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:20
msgid "Open the player scene, select the player node, and add an *AnimationPlayer* node."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:22
msgid "The *Animation* dock appears in the bottom panel."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:24
msgid "|image1|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:535
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:535
msgid "image1"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:26
msgid "It features a toolbar and the animation drop-down menu at the top, a track editor in the middle that's currently empty, and filter, snap, and zoom options at the bottom."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:30
msgid "Let's create an animation. Click on *Animation -> New*."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:32
msgid "|image2|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:536
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:536
msgid "image2"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:34
msgid "Name the animation \"float\"."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:36
msgid "|image3|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:537
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:537
msgid "image3"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:38
msgid "Once you created the animation, the timeline appears with numbers representing time in seconds."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:41
msgid "|image4|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:538
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:538
msgid "image4"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:43
msgid "We want the animation to start playback automatically at the start of the game. Also, it should loop."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:46
msgid "To do so, you can click the button with an \"A+\" icon in the animation toolbar and the looping arrows, respectively."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:49
msgid "|image5|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:539
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:539
msgid "image5"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:51
msgid "You can also pin the animation editor by clicking the pin icon in the top-right. This prevents it from folding when you click on the viewport and deselect the nodes."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:55
msgid "|image6|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:540
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:540
msgid "image6"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:57
msgid "Set the animation duration to ``1.2`` seconds in the top-right of the dock."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:59
msgid "|image7|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:541
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:541
msgid "image7"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:61
msgid "You should see the gray ribbon widen a bit. It shows you the start and end of your animation and the vertical blue line is your time cursor."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:64
msgid "|image8|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:542
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:542
msgid "image8"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:66
msgid "You can click and drag the slider in the bottom-right to zoom in and out of the timeline."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:69
msgid "|image9|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:543
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:543
msgid "image9"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:72
msgid "The float animation"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:74
msgid "With the animation player node, you can animate most properties on as many nodes as you need. Notice the key icon next to properties in the *Inspector*. You can click any of them to create a keyframe, a time and value pair for the corresponding property. The keyframe gets inserted where your time cursor is in the timeline."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:80
msgid "Let's insert our first keys. Here, we will animate both the translation and the rotation of the *Character* node."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:83
msgid "Select the *Character* and click the key icon next to *Translation* in the *Inspector*. Do the same for *Rotation Degrees*."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:86
msgid "|image10|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:544
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:544
msgid "image10"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:88
msgid "Two tracks appear in the editor with a diamond icon representing each keyframe."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:90
msgid "|image11|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:545
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:545
msgid "image11"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:92
msgid "You can click and drag on the diamonds to move them in time. Move the translation key to ``0.2`` seconds and the rotation key to ``0.1`` seconds."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:95
msgid "|image12|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:546
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:546
msgid "image12"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:97
msgid "Move the time cursor to ``0.5`` seconds by clicking and dragging on the gray timeline. In the *Inspector*, set the *Translation*'s *Y* axis to about ``0.65`` meters and the *Rotation Degrees*' *X* axis to ``8``."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:101
msgid "|image13|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:547
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:547
msgid "image13"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:103
msgid "Create a keyframe for both properties and shift the translation key to ``0.7`` seconds by dragging it on the timeline."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:106
msgid "|image14|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:548
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:548
msgid "image14"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:110
msgid "A lecture on the principles of animation is beyond the scope of this tutorial. Just note that you don't want to time and space everything evenly. Instead, animators play with timing and spacing, two core animation principles. You want to offset and contrast in your character's motion to make them feel alive."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:116
msgid "Move the time cursor to the end of the animation, at ``1.2`` seconds. Set the Y translation to about ``0.35`` and the X rotation to ``-9`` degrees. Once again, create a key for both properties."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:120
msgid "You can preview the result by clicking the play button or pressing :kbd:`Shift + D`. Click the stop button or press :kbd:`S` to stop playback."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:123
msgid "|image15|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:549
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:549
msgid "image15"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:125
msgid "You can see that the engine interpolates between your keyframes to produce a continuous animation. At the moment, though, the motion feels very robotic. This is because the default interpolation is linear, causing constant transitions, unlike how living things move in the real world."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:130
msgid "We can control the transition between keyframes using easing curves."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:132
msgid "Click and drag around the first two keys in the timeline to box select them."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:134
msgid "|image16|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:550
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:550
msgid "image16"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:136
msgid "You can edit the properties of both keys simultaneously in the *Inspector*, where you can see an *Easing* property."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:139
msgid "|image17|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:551
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:551
msgid "image17"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:141
msgid "Click and drag on the curve, pulling it towards the left. This will make it ease-out, that is to say, transition fast initially and slow down as the time cursor reaches the next keyframe."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:145
msgid "|image18|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:552
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:552
msgid "image18"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:147
msgid "Play the animation again to see the difference. The first half should already feel a bit bouncier."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:150
msgid "Apply an ease-out to the second keyframe in the rotation track."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:152
msgid "|image19|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:553
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:553
msgid "image19"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:154
msgid "Do the opposite for the second translation keyframe, dragging it to the right."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:156
msgid "|image20|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:554
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:554
msgid "image20"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:158
msgid "Your animation should look something like this."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:160
msgid "|image21|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:555
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:555
msgid "image21"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:164
msgid "Animations update the properties of the animated nodes every frame, overriding initial values. If we directly animated the *Player* node, it would prevent us from moving it in code. This is where the *Pivot* node comes in handy: even though we animated the *Character*, we can still move and rotate the *Pivot* and layer changes on top of the animation in a script."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:171
msgid "If you play the game, the player's creature will now float!"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:173
msgid "If the creature is a little too close to the floor, you can move the *Pivot* up to offset it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:177
msgid "Controlling the animation in code"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:179
msgid "We can use code to control the animation playback based on the player's input. Let's change the animation speed when the character is moving."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:182
msgid "Open the *Player*'s script by clicking the script icon next to it."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:184
msgid "|image22|"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:556
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:556
msgid "image22"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:186
msgid "In ``_physics_process()``, after the line where we check the ``direction`` vector, add the following code."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:216
msgid "This code makes it so when the player moves, we multiply the playback speed by ``4``. When they stop, we reset it to normal."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:219
msgid "We mentioned that the pivot could layer transforms on top of the animation. We can make the character arc when jumping using the following line of code. Add it at the end of ``_physics_process()``."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:240
msgid "Animating the mobs"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:242
msgid "Here's another nice trick with animations in Godot: as long as you use a similar node structure, you can copy them to different scenes."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:245
msgid "For example, both the *Mob* and the *Player* scenes have a *Pivot* and a *Character* node, so we can reuse animations between them."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:248
msgid "Open the *Player* scene, select the animation player node and open the \"float\" animation. Next, click on **Animation > Copy**. Then open ``Mob.tscn`` and open its animation player. Click **Animation > Paste**. That's it; all monsters will now play the float animation."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:253
msgid "We can change the playback speed based on the creature's ``random_speed``. Open the *Mob*'s script and at the end of the ``initialize()`` function, add the following line."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:272
msgid "And with that, you finished coding your first complete 3D game."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:274
msgid "**Congratulations**!"
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:276
msgid "In the next part, we'll quickly recap what you learned and give you some links to keep learning more. But for now, here are the complete ``Player.gd`` and ``Mob.gd`` so you can check your code against them."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:280
msgid "Here's the *Player* script."
msgstr ""
#: ../../docs/getting_started/first_3d_game/09.adding_animations.rst:447
msgid "And the *Mob*'s script."
msgstr ""
#: ../../docs/<rst_epilog>:0
msgid "Translation status"
msgstr ""