I want to modify the Third Person Controller character from Standard Assets to control more like a 3D platform character like in Super Mario 64 and the like.
However, I’ve noticed that you have no movement control besides turning while airborne.
I have tried as this article suggested by removing some IsGrounded()
checks, but nothing has changed. I’ve tried the same thing for enabling Animator.applyRootMotion
.
void HandleGroundedMovement(bool crouch, bool jump)
{
// check whether conditions are right to allow a jump:
if (jump && !crouch && m_Animator.GetCurrentAnimatorStateInfo(0).IsName("Grounded"))
{
// jump!
m_Rigidbody.velocity = new Vector3(m_Rigidbody.velocity.x, m_JumpPower, m_Rigidbody.velocity.z);
m_IsGrounded = false;
m_Animator.applyRootMotion = true;
m_GroundCheckDistance = 0.1f;
}
}
I relayed this to a friend who said that this code is more reliant on the Animator. Unfortunately, I have very little experience with using the Animator.
What can I do to easily modify the Third Person Character to add more flexible movement?