For a VR application I had to program the game mechanics of working Industrial cutters.
– the snapping of the cutter to the cutable railing
– Event triggers for the cut animation of the cutter
– the deforming of the mesh from the force received from the cutter blades
– The splitting of the mesh into two seperate meshes
The functioning first version has been created in 5 days.
Below you can see one of the sides of the railing as it has been cut. Cutting meshes creates a single face on the end of the mesh, which is not realistic looking for hollow railings. I gave the face a texture with a circular alpha channel in it to fake the hole.
The purple rectangles show the forces being applied to the mesh.
The green sphere indicated the radius in which the cutter snaps to the railing.
The cutter snaps the position and the rotation to fit that of the railing.