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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Colliders Not Working

Discussion in 'Scripting' started by Vilcythe, Feb 7, 2020.

  1. Vilcythe

    Vilcythe

    Joined:
    Aug 5, 2019
    Posts:
    2
    Hi all. I'm new to this sort of thing and am running into an issue with colliders. I have the sprite moving via mouse click and have Rigidbody2D along with a circle collider on the Sprite. All decorations have circle colliders on them as well, but the Sprite just passes right through. Any suggestions? Movement Script.PNG Sprite Properties.PNG
     
  2. TheGameNewBie

    TheGameNewBie

    Joined:
    Jul 27, 2017
    Posts:
    92
    Try changing the RIgidbody body type from Kinematic to some other type (I forgot what it's called)
    I think Kinematic Rigidbodies do not work with collisions.

    I may be wrong though.
     
  3. Vilcythe

    Vilcythe

    Joined:
    Aug 5, 2019
    Posts:
    2
    I've tried it with Dynamic as well and it still doesn't collide.
     
  4. VSMGames

    VSMGames

    Joined:
    Jan 12, 2020
    Posts:
    47
    Change the rigidbody to dynamic and make sure your circle collider covers the whole sprite or atleast areas you want. Also make sure your other colliders are in right position and size so that the two colliders actually collide with each other.
     
  5. xaviergamerpro9

    xaviergamerpro9

    Joined:
    Jul 10, 2020
    Posts:
    12
    Ive got the same problem
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    Not_Sure likes this.
  7. Deathbysin666

    Deathbysin666

    Joined:
    Nov 16, 2021
    Posts:
    2
    I have ssame issue with Cabin models from Tutorials
     
  8. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,541
    This.

    And remember to do it on FixedUpdate, not Update.
     
    Kurt-Dekker likes this.