In this recipe, we are going to use a 3D version of the particles' code base from the Creating a particle system in 2D recipe. To navigate in 3D space, we will use MayaCamUI
covered in the Using MayaCamUI recipe in Chapter 2, Preparing for Development.
To simulate repulsion, we are using the code from the Applying repulsion and attraction forces recipe with slight modifications for three-dimensional space. For this example, we are using the ducky.mesh
mesh file that you can find in the resources
directory of the Picking3D sample inside the Cinder package. Please copy this file to the assets
folder in your project.
We will create particles aligned to the mesh. Perform the following steps to do so: