O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Non-linear animations

The reason for the described problem is that our animations are linear. As we noted at the beginning of this chapter, linear animations rarely occur in nature, which usually makes their use yield a very unrealistic result.

We also said earlier that Qt Quick allows us to use easing curves to perform animations along non-linear paths. There are a large number of curves offered. Here's a diagram listing the available non-linear easing curves:

You can use any of the curves on an element of the PropertyAnimation type or one derived from it (for example, NumberAnimation). This is done using the easing property group, where ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required