User Tools

Site Tools


position_tween

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

position_tween [2017/03/11 18:22]
position_tween [2019/07/16 20:31] (current)
Line 1: Line 1:
 +;#;
 +[[tweening#​Tweening Tutorial|Back to Tweening tutorial]]
 +;#;
  
 +=====Position Tween=====
 +As its name implies, this tween is related to movement. Let's say you have an object in the frame #1 and you want to take it through the canvas area from the current position to another point following an specific path and using **N** frames (where **N** is the frames total defined by yourself), well this tween can help you to do the hard work creating **N-1** frames for you and placing the object in the right place for every frame, generating the illusion of movement for that item.
 +
 +Ok, let's animate a bouncing ball to make things go easier. First at all, let's add a circle (our ball) in some point of the top-left corner of the canvas in our first frame.
 +
 +{{ wiki:​position_tween_circle.png }}
 +;#;
 +**Fig 3**. Drawing a circle (our bouncing ball)
 +;#;
 +
 +Now, let's open the Position tween from the Tweening menu.
 +
 +{{ wiki:​position_tween_menu.png }}
 +;#;
 +**Fig 4**. Selecting the Position tween
 +;#;
 +
 +Take a look at the panel in the right side of the canvas. This is the Position tween manager, the interface where you will create and edit all the tweens of this type.
 +
 +{{ wiki:​position_tween_manager.png }}
 +;#;
 +**Fig 5**. Position tween manager
 +;#;
 +
 +The next step is to create our first Position tween, so let's fill in the first field of the panel with the name "​ball"​ and click on the plus button.
 +
 +{{ wiki:​position_tween_name.png }}
 +;#;
 +**Fig 6**. Creating new tween
 +;#;
 +
 +Now you will have access to the properties of your current tween. As you can see, you will have to do two tasks: 1. Select the object you want to move and 2. Define the path you want for your object goes over.
 +
 +{{ wiki:​position_tween_properties.png }}
 +;#;
 +**Fig 7**. Position tween properties
 +;#;
 +
 +Following the first step, let's select the only object we have in the scene. **Tip:** It's possible to select several objects for the same tween.
 +
 +{{ wiki:​position_tween_selection.png }}
 +;#;
 +**Fig 8**. Selecting object for the Position tween
 +;#;
 +
 +Following the second step, let's pick on the **Set Path Properties** checkbox, to define the path we want for the selected object.
 +
 +{{ wiki:​position_tween_path.png }}
 +;#;
 +**Fig 9**. Setting the path for the Position tween
 +;#;
 +
 +Now we have to define the first segment of our path by clicking once on some point of the canvas where we want our bouncing ball to move toward. ​
 +
 +{{ wiki:​position_tween_subpath01.png }}
 +;#;
 +**Fig 10**. Defining the first subpath of the tween
 +;#;
 +
 +We can create many subpaths as we want to, but for this example we will just create two, so we will click one more time to the define the whole route of the tween. For now, it has the shape of a "​V"​ letter.
 +
 +{{ wiki:​position_tween_subpath02.png }}
 +;#;
 +**Fig 11**. Defining the second subpath of the tween
 +;#;
 +
 +As we are simulating a bouncing ball, we will edit the first subpath dragging the white node in its end (out of the subpath) to transform that segment into a curve. ​
 +
 +{{ wiki:​position_tween_editpath01.png }}
 +;#;
 +**Fig 12**. Editing the curve of the first path
 +;#;
 +
 +And we will repeat the same procedure with the second subpath to define the complete route of our tween. This will be the way our bouncing ball will go over.
 +
 +{{ wiki:​position_tween_editpath02.png }}
 +;#;
 +**Fig 13**. Editing the curve of the second path
 +;#;
 +
 +By default, the Position tween assigns few frames for every subpath, as you can see it in the table of the properties panel. To edit every frame cell you can either double click on each one or to use the **+**|**-** buttons to increment/​decrement the frame values for every segment.  ​
 +
 +{{ wiki:​position_tween_spreadsheet01.png }}
 +;#;
 +**Fig 14**. Frames per subpath ​
 +;#;
 +
 +So, we will edit every segment to set 20 frames per subpath, getting a total of 40 frames for the whole example.
 +
 +{{ wiki:​position_tween_spreadsheet02.png }}
 +;#;
 +**Fig 15**. Editing frames per subpath
 +;#;
 +
 +Now we have to click on the **Update Tween** button to apply this tween to the current scene. So, Tupi will calculate the position of our bouncing ball for every frame.
 +
 +{{ wiki:​position_tween_apply01.png }}
 +;#;
 +**Fig 16**. Applying tween
 +;#;
 +
 +Once the tween is applied, you will see how the new frames are generated automatically by the program. When you are done, you can close the properties panel of the current tween by clicking on the **Close** button.
 +
 +{{ wiki:​position_tween_apply02.png }}
 +;#;
 +**Fig 17**. Tween applied
 +;#;
 +
 +So now let's go to the **Player tab** and watch the result of our first tween exercise, a bouncing ball! 
 +
 +{{ wiki:​position_tween_preview.png }}
 +;#;
 +**Fig 18**. Playing the tween animation
 +;#;
 +
 +Remember two things: 1. You can edit the parameters of every tween any time you need it, including to modify the path nodes and adding new subpaths as we did it at the first time, and 2. You can't add new tweens over the same object, just once. To release an object, you have to remove the tween related to that item.
 +
 +{{ wiki:​position_tween_close.png }}
 +;#;
 +**Fig 19**. Tween manager ​
 +;#;
 +
 +**Note:** To delete a tween, select it from the tween manager panel and click on the **Remove Tween** button.
 +
 +{{ wiki:​position_tween_remove_button.png }}
 +;#;
 +**Fig 20**. Removing a tween from the tween manager ​
 +;#;
 +
 +These are some videos from our [[https://​youtube.com/​c/​maefloresta|Youtube channel]] with additional exercises using the Position tween feature: ​
 +    * [[https://​www.youtube.com/​watch?​v=Y0Y2z8byS8c|Spaceship]]
 +    * [[https://​www.youtube.com/​watch?​v=H3dcYzuFeAU|Fly flight]]
 +    * [[https://​www.youtube.com/​watch?​v=QOatgQuVU-A|Skater]]
 +    * [[https://​www.youtube.com/​watch?​v=o0DZ6AYWh58|Letter A]]
 +
 +;#;
 +[[tweening#​Tweening Tutorial|Back to Tweening tutorial]]
 +;#;