Dynamically balanced and plausible trajectory planning for human-like characters