Moved out some code for the rigid body tracker into a new base class to simplify logic in the future.