Search Unity

Question CharacterController not follow movement of parent animation

Discussion in 'Animation' started by GameCoder135, Sep 9, 2023.

  1. GameCoder135


    Feb 11, 2023
    I have a child Player Armature gameObject,and I want it to move with my platform.My platform uses animation to move.But the charactercontroller cannot follow and lags behind the platform.I tried to change the framew rate of animation but it does not work.

    Code for making the charactercontroller child.
    Code (CSharp):
    1. transform.parent=other.transform

    To make it clear.lets name the player "Player"(the little man) and the platform "Platform"(the rectangle.And green boxes stand for collider(capsule size is charactercontroller)

    At a,the player step on the platform and hit the trigger collider,the animation starts moving.And the code set the "Player" a child object of "Platform"

    At b point,the Player is not following the platform,it fall down from the platform.
    Last edited: Sep 10, 2023