Making the Character Move
If I say physics engine, you might have images flashing in front of your eyes of scientists doing all kinds of simulations of real-world phenomena trying to predict what would happen in the real world – maybe to study car crashes, the weather, or wind park optimization.
Games use a physics engine, too. However, in games, this engine has other priorities. Unlike the ones scientists use, physics in games doesn’t have to be 100% accurate. It just has to give the feeling of realism or, contrarily, the lack thereof.
In this chapter, we will learn how to use the physics engine of Godot, so we don’t have to deal with complex interactions such as moving characters or collisions between multiple physics objects within the world.
First, we will have to make a detour and refresh our basics in two-dimensional vector math. I promise a little bit of math won’t hurt!
In this chapter, we will cover the following main topics:
-
...