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

Create with Code challenge 4, balls go through mesh colliders

Discussion in 'Physics' started by coreyh2, Jan 27, 2020.

  1. coreyh2

    coreyh2

    Joined:
    Jun 4, 2019
    Posts:
    5
    I'm still learning Unity.

    When running this project there are balls held in a box made of planes with mesh colliders. Moving slowly into the walls will bounce the player or enemy away. Its seems fairly easy to bump the balls out of bounds of the play field though. I can use the boost to just go through the walls, or push the enemy balls through walls.

    How do I stop this from happening?
     
  2. knobblez

    knobblez

    Joined:
    Nov 26, 2017
    Posts:
    223
    Increasing the wall width would probably help. I believe mesh colliders are kind of heavy; why not use box colliders?
     
    Last edited: Jan 29, 2020
  3. coreyh2

    coreyh2

    Joined:
    Jun 4, 2019
    Posts:
    5
    I'll try that, the type of colliders were pre-made in the project and there wasn't any discussion in text about how computationally difficult the different kinds were.

    --
    Using box colliders and making them thicker did seem to fix it. Thanks :)
     
    Last edited: Jan 29, 2020