- Home /
Other
Using Ethan's Third Person Controller in Unity 5, how can I get mid-air control?
I am making a platformer. Any way to modify Ethan's character controller to allow change of direction control while jumping?
I would like to know how to move Ethan in mid-air as well
This question assumes quite a bit (Ethan?). If you want help from the UA community as a whole, you should post the relevant code. I assume it would be something like
if(jumping)
// add Input.GetAxis stuff here affecting moveDir
...which tells me nothing, as I don't. I'm going to close this as the OP isn't even participating, if you want to pursue this ask your own.
Why close it when the question hasn't been answered
Not for sure why this was closed, Ethan is the Standard asset third person controller character that comes with Unity. Comment out this line!! The animator drives movement based on animations, this allows movement in the air in this setup. Further changes would be need to get it working smoothly.
ThirdPersonCharacter.cs
//m_Animator.SetBool("OnGround", m_IsGrounded);
note this does not remove m_isGrounded, which still works, also the anim speed controls movements and that is changed in this line. I modified like this to have slower air control.
{
// don't use that while airborne
m_Animator.speed = m_AnimSpeed$$anonymous$$ultiplier*0.6f;
}
Edit - Seeing the better way. To keep animations, applying extra velocity during !m_IsGrounded can be a smoother approach to this. Extra velocity can be translated from the existing move x and y to the object like the jump does during the fly times.
Follow this Question
Related Questions
Unity5 how to remove the extra step in the built in character controller 0 Answers
How can I rotate a character 180 degrees by D, and -180 by A 2 Answers
Localscale-flipped 2D character retains original rotation since 5.4 2 Answers
How to be tangent with the ground without a character controller? 2 Answers