- Home /
The question is answered, right answer was accepted
Why I have a 'lag' between parent and child ?
Hello everyone,
I am using the FantasyAI 2.0 system. Until now it worked ok, but today I had to implement my new models in the game, replacing the placeholder models.
I have the orc1Test parent with different children. The thing is that when I run the game, the orc1 child (which is the animated object) runs in front of the parent and the rest of the childrens (as you can see in the pic).
Have you guys encountered this ? Any ideas ?
Thank you
If both objects are moving then the child object is going at the speed of: child object + parent object as children follow the parent transform. Does this help? If not check the inspector for the child and zero his transform to bring him back to the parent
If the issue persists, you can use scripting to force him to stay in place with this code.
function Update () {
transform.localPosition = Vector3.zero;
}
That could be an 'in-place' animation issue. It is a legacy animation so you need to write a legacy script ins$$anonymous$$d of using modern Unity method.
Oops, my bad, with the legacy animations, you need to use LateUpdate to override the animation positioning. Also, check the animation to see if the animation has your orc moving forward.
Try it in Generic, as you did the $$anonymous$$ecanim stuff, Bake them then apply motion through script as root-motion wont work
Follow this Question
Related Questions
Attaching Weapon to Animated Character 0 Answers
How to make a animation invisible? 1 Answer
[Solved] Animation destroying along with the GameObject its a child of 1 Answer
Random Animation of gameObject Children 1 Answer
Unity Animation Problem 0 Answers