A physics engine is a software library that simulates how objects move in the real world. Adding physics to an application provides a way to create animations that appeal to the user's sense of realism. While it is possible to create animations that have a life-like quality without implementing physics, cracking open that high school physics book will provide consistency throughout your application. However, if the thought of implementing “real life” in your application feels a little out of scope, you can make use of a third-party library. This chapter will explore what a physics engine can do, and how to use an excellent open-source library to add physics-based effects to a JavaFX application.
The most obvious use ...