Search Unity

Floating Sprite

Discussion in '2D' started by brodan100105, Mar 17, 2017.

  1. brodan100105

    brodan100105

    Joined:
    Jul 16, 2016
    Posts:
    13
    So i was trying to make a 2D game, and I have a problem, I made my sprite, imported it and everything, and when i gave it a collider and rigid body it floats slightly over the ground (which also has a collider) what do i do?
     
  2. brodan100105

    brodan100105

    Joined:
    Jul 16, 2016
    Posts:
    13
    here is a picture upload_2017-3-17_17-1-55.png
     
  3. DanielQuick

    DanielQuick

    Joined:
    Dec 31, 2010
    Posts:
    3,137
    Adjust the size of your colliders so it doesn't float.
     
  4. webox

    webox

    Joined:
    Aug 27, 2015
    Posts:
    72
    Every collider component has an "Edit Collider" option.. use it to set every collider to its correct size.
     
  5. MandasUnity

    MandasUnity

    Joined:
    Jan 15, 2019
    Posts:
    1
    set rigidbody gravity 0 also adjust the colliders to fit your sprite and also try to disable rotation to z