Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Player object going through a collider if it moves too fast

Discussion in 'Physics' started by matias-e, Mar 3, 2015.

  1. matias-e

    matias-e

    Joined:
    Sep 29, 2014
    Posts:
    106
    Hey, I'm having a problem where my sphere game object goes through a cube object with a collider if it moves too fast.

    I Googled the subject and found a bunch of answers, but sadly none seemed to work for this situation. I have used the DontGoThroughThings script and dropped it on the player. I tried changing the rigidbody to continuous dynamic mode, but this did not help either.

    I'm kind of lost on what to do. What could be the cure here?
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
  3. matias-e

    matias-e

    Joined:
    Sep 29, 2014
    Posts:
    106
    Tried adjusting the physics settings, but it didn't help. :(

    Hmm, that article looks interesting. However, the C# package doesn't seem to be available for download. I tried the Javascript bit on my player object but the problem prevailed.

    I wonder if the problem is in the fact that I have a [variable].transform.Rotate(0, 0, [variable linked to Get Axis for mouse Y]) code bit that controls the rotation of the colliders? The player object's rigidbody collides at slower speeds either way, so I'm not sure.
     
    Last edited: Mar 3, 2015
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
    ^ download link fixed