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

High Speed Objects Pass Through

Discussion in 'Editor & General Support' started by iamfeyre, May 27, 2016.

  1. iamfeyre

    iamfeyre

    Joined:
    May 20, 2016
    Posts:
    56
    ok so i have a normal bike game.. the road and side walls is a mesh collider and bike and player is a box collider..

    so when i move the bike with speed around 10 its too slow but works perfectly... but if i speed it up to about 100 which is niice... and if i collide it with the mesh wall or somethin... it passes through it...

    i read about this and there are solutions like changing 'Min Penetration for Penalty' in project settings to low value, raycasting or using collisiondetection...

    so my question is...

    1) If i leave it as it is... on the compiled game for pc or android, will the bike still pass through the mesh??

    2) if i change the 'Min Penetration for Penalty' in project setting, will the compiled game performance will be affected??

    3) how will the performance of compiled game be affected if i use the raycasting method or the DynamicCollisionDetection method???

    I LV U ALL :):):):)
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Are you using Rigidbodies?
     
  3. iamfeyre

    iamfeyre

    Joined:
    May 20, 2016
    Posts:
    56
  4. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Change to Continuous Dynamic detection on it.
     
  5. iamfeyre

    iamfeyre

    Joined:
    May 20, 2016
    Posts:
    56
    I did... it still passes through...

    i even changed the project settings...

    it is still passing through
     
  6. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,760
    This happens to me if my character controller starts moving through the scene too fast. The player will randomly fall through the floor or get stuck inside a collider. I'm using the default unity code for moving the character controller, using the "isGrounded check". When the player falls through the floor it is usually at a boundary of floor pieces with mesh colliders. It is very intermittent and rare. I find replacing mesh colliders with box colliders helps with the issue. Also making sure the colliders intersect with each other helps. If there is even the smallest gap between two colliders, you run the risk of glitching through the wall or floor when moving at high speeds.
     
  7. iamfeyre

    iamfeyre

    Joined:
    May 20, 2016
    Posts:
    56
    @TTTTTa
    the road and side wall is mesh collider... i cant make it box cause it will take a LOT LOT LOT of time to do that....

    and yea thats that i said, at high speed biike goes through the side wall...

    BTW - if this happens in unity... will it also happen if i compile the game and play it on my pc or android device???
     
  8. iamfeyre

    iamfeyre

    Joined:
    May 20, 2016
    Posts:
    56
    please help...
     
  9. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,760
    If it happens in the editor, most likely it will also happen in the game.
    You should post your code you're using to move the bike/player. Just so someone can rule out the fact that you're doing something wrong with moving the bike/player.
    IF your code is OK, the only other option might be to add box colliders in one area to test it out to see if the issue still happens.
     
  10. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,514
    Please don't post to five-year-old threads with a brand-new problem. It's against forum rules.

    Instead, start your own post... it's FREE!

    When you do, here is how to report your problem productively in the Unity3D forums:

    http://plbm.com/?p=220

    How to understand compiler and other errors and even fix them yourself:

    https://forum.unity.com/threads/ass...3-syntax-error-expected.1039702/#post-6730855

    If you post a code snippet, ALWAYS USE CODE TAGS:

    How to use code tags: https://forum.unity.com/threads/using-code-tags-properly.143875/

    Specific to passing through things, Raycasting (or other forms of collision casting such as Linecast or spherecast) can help you here, and give you some things to google for.