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

Passing through collider

Discussion in 'Editor & General Support' started by DhirajKarangale, Jul 11, 2022.

  1. DhirajKarangale

    DhirajKarangale

    Joined:
    Jan 3, 2021
    Posts:
    9
    I am new to unity. I started procedural world generation tutorial by Sebastian Lague form this tutorial
    , but after completing the tutorial I got problem player with rigidbody fps controller with continuous collision detection pass through meshes when the player is that high speed, check this video
    I tried to set target framerate to 60 and also other solution from internet but got nothing. I am trying to solve this problem by directly downloading Sebastian project but the same problem occurs and also set shared mesh to mesh collider. Help me to solve this problem.
     
  2. ronJohnJr

    ronJohnJr

    Joined:
    Mar 5, 2015
    Posts:
    106
    I downloaded the project. It has something to do with how the terrains are stitched together. You fall when you reach a seam in the terrain
     
  3. DhirajKarangale

    DhirajKarangale

    Joined:
    Jan 3, 2021
    Posts:
    9
    Thanks for helping
    You have any idea hot to fix it
     
  4. ronJohnJr

    ronJohnJr

    Joined:
    Mar 5, 2015
    Posts:
    106
    So I took a closer look. I can tell you your problem, but unless I go through the course I can't tell you how to fix it. Only the collider on your starting terrain square is being given a mesh. If you click your other terrains you'll see the mesh part says none. So technically it's like all those terrains don't even have a collider. So you'll have to figure out how to feed the colliders the mesh of the terrain that collider is on.
     
  5. DhirajKarangale

    DhirajKarangale

    Joined:
    Jan 3, 2021
    Posts:
    9
    I already did that i.e adding mesh in mesh collider
     
  6. ronJohnJr

    ronJohnJr

    Joined:
    Mar 5, 2015
    Posts:
    106
    No, you have to add it to the collider, not the terrain. Look at the collider where it says mesh. Everywhere but your starting terrain says none
     
  7. DhirajKarangale

    DhirajKarangale

    Joined:
    Jan 3, 2021
    Posts:
    9
    Thank you I manage to solve this problem with this info.
     
    ronJohnJr likes this.
  8. ronJohnJr

    ronJohnJr

    Joined:
    Mar 5, 2015
    Posts:
    106
    I know the youtube video is old, but maybe link to this thread or leave a comment on how to fix it to help other people
     
  9. DhirajKarangale

    DhirajKarangale

    Joined:
    Jan 3, 2021
    Posts:
    9
    So the project calculate the collider according to player position and in this script I did not add the player transform in it so this script only calculate the colliders at the start pos and player pos not update in this script so the collider never calculated,
    Solution :- Just add player transform in Map Generator Viewer Field in Inspector.