7

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 ...

Get Learning GDScript by Developing a Game with Godot 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.