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

Disable Terrain Collider but keep trees colliders

Discussion in 'Scripting' started by SnaiperoG, May 29, 2022.

  1. SnaiperoG

    SnaiperoG

    Joined:
    Apr 6, 2015
    Posts:
    63
    I will describe my situation to understand what i need and why.

    I have terrain and mesh created from this terrain. (because terrain have bad performance, especially on mobile)
    Mesh terrain used to physics calculations of player and enemies as walking mesh.
    Terrain not drawing but used as terrain trees holder, because as i found, trees terrains works much better then trees as prefabs (gameobjects), i guess because of tree colliders bake by terrain.
    And now i have duplicated colliders, one from terrain, where trees placed and one from mesh terrain.

    How to disable terrain collider, but keep trees colliders from this terrain?
    Unity 2019.4.36f1
    ter.png
     
    Last edited: May 29, 2022
  2. Cyber-Dog

    Cyber-Dog

    Joined:
    Sep 12, 2018
    Posts:
    352