O'Reilly logo

Learning AndEngine by Martin Varga

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

Joints

When we need to connect two bodies together in Box2D, we use joints. Joints always connect two bodies and never more. Multiple joints are then required to link more bodies together. A joint always connects a dynamic body with another body that can be either static, kinematic, or dynamic. Joints between kinematic and static bodies are allowed but have no effect.

Note

Joints update the body positions and rotations based on the type of joint. You can define two bodies in an arbitrary location and rotation, but if the joint restricts the position, for example, the bodies will immediately transform to the proper position after the simulation starts.

A joint can also specify whether the connected bodies should collide or not. We are going to see ...

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