Automatic recognition and mapping of constraints for motion retargetting