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 thin sweeptest doesn't always collide correctly

Discussion in 'Physics' started by dogs_, Mar 1, 2024.

  1. dogs_

    dogs_

    Joined:
    Mar 14, 2016
    Posts:
    32
    i'm using a sweeptest to check for ground contacts (i have a character controller which never touches the ground so i need to use sweeps/casts to build fake contact points) and i've noticed that my sweepest doesn't seem to work if the rigidbody i'm sweeping with has a very small collider (<0.1 units on any axis).
    i assume this is due to floating point error and is not solvable?
    my instinctual solution is to... well to make everything in my project 2x or 4x as large as it is at the moment, however that comes with its own problems and constitutes a nontrivial amount of work.
    is there uhhh anything other than scaling the whole universe that might solve this problem? is this documented anywhere?