To add physics to our game, we will be using the Bullet Physics engine. This is an open source project that is widely used in AAA games and movies. It is used for collision detection as well as soft- and rigid-body dynamics. The library is free for commercial use.
Download the source from https://github.com/bulletphysics/bullet3 , and using CMake you will need to build the project for the release version of x64. For your convenience, the header and lib files are included in the project for the chapter. You can take the folder and paste it into the dependencies folder.
Now that we have the folder, let's take a look at how to add Bullet Physics by following these steps:
- Add the include folder in C/C++ | General | Additional Include Directories as shown in the following screenshot:
- Add the lib/win64/Rls folder in Linker | General | Additional Library...