Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

BUG? Player colliding when should not

Discussion in 'Project Tiny' started by developer_plus, Apr 8, 2019.

  1. developer_plus


    Jan 10, 2017
    my player is walking over a collider, but when that ends, the player don't fall, just still going straight like if it was over a collider, but if I press to jump it falls down. How can I fix it?

    The player has a rigidbody.

    jump code:
    Code (CSharp):
    1. if (ut.Runtime.Input.getMouseButtonDown(0)) {
    2.                                     this.playClip("jumpAudio");
    3.                                     const physicsConfig =;
    4.                                     physicsConfig.gravity = new Vector2(0, -30);
    5.                           ;
    6.                                     let vel = new ut.Physics2D.SetVelocity2D;
    7.                                     vel.velocity = new Vector2(0,0);
    8.                                     let impulse = new ut.Physics2D.AddImpulse2D;
    9.                                     impulse.impulse = new Vector2(0, player.jumpForce);
    10.                           , vel);
    11.                           , impulse);
    12.                                 }
  2. sniffle63


    Aug 31, 2013
    It might be because your changing the pivot of your collider.

    Iv noticed you have to move the collider around with the transform and leave its pivot at (0.5, 0.5)