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
  3. Dismiss Notice

Question Disabling collisions for particular quads on terrain collider

Discussion in 'Physics for ECS' started by Shinyclef, Apr 1, 2024.

  1. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    506
    Hello,

    I have a terrain collider. It's using the VertexSamples collision method.
    Each quad on the terrain is a tile in my gameplay, and tiles can be destroyed.
    I have a rendering solution for destroyed tiles, and now I'm thinking about the physics. A destroyed tile has no collisions, it's essentially a hole. I don't want to disable 'all' collision with the terrain if the player's origin is over a destroyed tile, because the edge of the player collider could still hit the edges of the hole. I should be able to bump into the edges of non-destroyed tiles if I'm falling through a destroyed tile hole.

    Got any ideas on how I might implement this? Is there a stage in the pipeline I might be able to modify? Or is it not going to be so simple...?

    Cheers.

    upload_2024-4-1_21-45-7.png