Cleaned up transitionDynamics.  Added a flag to enable/disable agent position reset.