Hi, what is happening is that I had set-up a character that jump when I added force to its rigidbody, but when I added the animation, the model goes higher than the box collider.
How could I make it so that the collider “follows” the model?
This is part of the code that I use for the jump:
public Animator Runner_Controller;
private bool touchingPlatform;
private Vector3 startPosition;
void Start () {
GameEventManager.GameStart += GameStart;
GameEventManager.GameOver += GameOver;
GameEventManager.GameWin += GameWin;
startPosition = transform.localPosition;
gameObject.SetActive(false);
Runner_Controller.SetBool("Jumping",false);
}
void Update () {
if(Input.GetButtonDown("Jump")){
if(touchingPlatform){
rigidbody.AddForce(jumpVelocity, ForceMode.VelocityChange);
Runner_Controller.SetBool("Jumping",true);
touchingPlatform = false;
}