Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Please!How to make charactor walk on a sphere using root motion?

Discussion in 'Animation' started by AOLO, Mar 2, 2021.

  1. AOLO

    AOLO

    Joined:
    Feb 14, 2021
    Posts:
    2
    Have tried almost a day,using the "ThirdPersonCharacter.cs" in the Standard Assets.
    I do these things:
    1.off the rigibody gravity of charactor
    2.set a force refer to the planet by this way
    gravityForce =Planet.position - transform.position;
    m_Rigidbody.AddForce(gravityForce );
    3.set the direction
    this.transform.up=-1*gravityForce.normaliezd;

    The question is in the Standard Assets,they move the charactor by root motion,
    instead of rigibody.velocity for which my charactor can't move !
    I tried to set the Animator.bodyrotation=this.transform.rotation but it dosent walk;
    Can anyone help me out please!


    upload_2021-3-2_16-29-52.png
     
  2. AOLO

    AOLO

    Joined:
    Feb 14, 2021
    Posts:
    2
    Fixed
    1st
    dont use transform.up directly
     
unityunity