Added getState function to MotionGraph