Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Avoid going through the ground at any time

Discussion in 'Physics' started by unity_AA7310A29ECC7F8838F7, Mar 15, 2023.

  1. unity_AA7310A29ECC7F8838F7


    Mar 15, 2023
    here a gif to explain my problem (please click on image attached to animate)

    My character in blue going through the floor because it is hitting a sphere with sphere collider.
    My character have a box collider.
    I need to keep thoses collider's shapes.
    I can't scale height of the gray sphere collider because my character will sometimes scale down (and could going under the gray sphere).
    Finally my floor in red is a cube with box collider.

    How can I prevent my character going through the floor like this, please ?