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.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Sprite that stops moving for no reason

Discussion in '2D' started by scorpion77, Mar 2, 2018.

  1. scorpion77

    scorpion77

    Joined:
    Jan 13, 2018
    Posts:
    15
    Hi everyone, I'm trying to make a 2D platformer. I noticed that the player's sprite, sometimes it get stuck, and can no longer move forward, as if there were an invisible wall. The problem seems random. Usually it does soon after the start of the level, I move the player to the right and then change direction to go left. In this way you see the sprite trying to move to the left (the animation works), but it can’t move forward, as if there were an invisible wall. The only way to go left is to jump, in fact, even if I go to the right and if I go back I'm stuck by the invisible wall. I also tried to remove the script that manage the camera, but the problem persists, so it's not a scrolling problem. What can it be? Has this already happened to anyone?

    Thanks for your help
     
    ArleUrameshy likes this.
  2. vakabaka

    vakabaka

    Joined:
    Jul 21, 2014
    Posts:
    1,153
    If the player has box collider2d, then try with capsule collider 2d
     
    ArleUrameshy and scorpion77 like this.
  3. scorpion77

    scorpion77

    Joined:
    Jan 13, 2018
    Posts:
    15
    Great! Thank you very much! It works!