O'Reilly logo

Libgdx Cross-platform Game Development Cookbook by Alberto Cejas Sánchez, David Saltares Márquez

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

Chapter 10. Rigid Body Physics with Box2D

In this chapter, we will cover the following recipes:

  • Introducing Box2D
  • Introducing more complex shapes
  • Introducing joints
  • Real-life joints example – bike simulator
  • Reacting to collisions
  • Sensors and collision filtering
  • Querying the world
  • Building a physics world from level data
  • Implementing a deferred raycaster
  • The fixed timestep approach

Introduction

The path to reach this chapter has been long. Coding sessions and headaches have turned you into a master of the Libgdx subsystems, but there is still one important topic that resists your reign: Box2D physics.

Do not be afraid, brave knight, because as a man of action, this chapter brings you a lot of practical content to dominate and just the necessary theoretical ...

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