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

Question How not to skip the collider without rigidbody and character controller.

Discussion in 'Physics' started by Zimaell, Apr 16, 2023.

  1. Zimaell

    Zimaell

    Joined:
    May 7, 2020
    Posts:
    345
    I make the movement of the object through a transform or through a movetowards, with capsule collider, I check the ground through a check sphere, but when the object goes down or up on an inclined, it sometimes falls through the ground (through a collider, for example, a terrain).

    How to exclude the penetration of one collider into another, to exclude such failures in the ground or in the walls? Important: without rigidbody and character controller (for some reasons)

    Game in 3D, fixedupdate (for network).
     
  2. Turtlehellmax

    Turtlehellmax

    Joined:
    Nov 26, 2020
    Posts:
    4
    This is bound to happen if you modify the transform's position directly. I would recommend adding a rigidbody to the character locally and using Rigidbody.MovePosition instead.