This paper proposes a new approach for motion retargetting i.e. adjusting motion-capture data to different characters and scenes. In chaise of achieving universality, the existing retargetting techniques often become absolutely impractical for most of real-life applications. In contrast, we did not try to create a technique that can deal with practically any motion, but concentrated on creating a practical solution that is able to produce realistic results for a some subset of all motions. So, the corner-stone idea of our approach is that realistic retargetting can only be achieved if the algorithm is aware about the structure and specific features of the processed motion. We applied this idea to animation of human locomotion and developed a motion-analysis algorithm that can identify type/ structure of the motion and extract a lot of useful information, such as gait phases, foot-ground constraints, important features that should be preserved during retargetting, etc. Also, we developed an IK-based retargetting solver that can take advantage of using this information and can produce accurate and realistic animations of human locomotion.