Chapter 9. Incorporating 3D Physics

Physics is not yet well developed in PV3D, but having a good physics engine is a must for building dynamic websites and games.

Good physics engages users in kinesthetic modality, activating the "buying" part of their brains. Like particles, physics provides an important element of realism to your application. When a camera follows a racing car taking a sharp turn, the camera veers off a little to demonstrate centripetal force. This requires physics. In this chapter we demonstrate the method of adding physics to PV3D.

Also in this chapter you work through a number of examples, illustrating different approaches for incorporating physics into PV3D. You learn to make your objects interactive using the Interactive Scene Manager, and how to build large-scale applications using states, modules, and porting. You also add acceleration and gravity to your camera, as well as orbiting particles. You discover how to build encapsulated oscillation classes as well. Finally, you discuss 3rd party physics engines: WOW and Jiglibflash, and then build some Jiglibflash starter codes to be used in the next chapter.

This chapter is packed with examples, not all of which could be included in full in the text. In some cases, just highlights with code snippets are given, but for all examples, you can obtain the full code from the book's website.

Understanding the Guts of Physics

Believe it or not, the entirety of physics consists of only four concepts: position, time, mass, ...

Get Professional Papervision3D now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.