O'Reilly logo

Panda3D 1.6 Game Engine by Dave Mathews

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

Exposing joints

We can do more with Actors than just play animations on them. We can also attach other NodePaths to specific joints in an Actor so that they will follow that joint wherever it moves. This technique is often used to put objects in a character's hands. For our game, we'll be using it to attach the discs and turret to our cycle.

This technique works well for us because we want to change the rotation of the discs and turret. For that to work correctly, the models need to have the points they will rotate around at (0, 0, 0) in their own coordinate system. That means we can't reposition them in the modeling software, as we did with the static parts of the cycle such as the power plant.

Instead, we'll load an Actor that only contains three ...

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