Search Unity

Non Terrain object to Billboard when the camera is a certain distance away?

Discussion in 'Scripting' started by prioxis, May 25, 2017.

  1. prioxis

    prioxis

    Joined:
    Aug 2, 2013
    Posts:
    4
    Background - So I'm currently creating a survival game and I've looked to other survival games made on the Unity Engine (e.g. Rust, Unturned, Salt, etc..) all which have some sort of tree chopping system. I was trying to replicate their tree chopping using the terrain but found that all the solutions from Unity Answers and the Forums posted by other users either created more problems or weren't nearly as refined or could be as refined as the systems in the games mentioned above..

    Issue - So I created the system for tree prefab objects that are placed about in my scene but the thing I'm trying to figure out how to make the prefab of my tree behave like a terrain tree and become a billboard once it's a certain distance away from the Camera and whether or not it's worth making it appear as a billboard for performance sake.

    Extra - If anyone knows if Rust or Unturned or any unity based survival game uses TerrainTrees for their game please let me know I'm really confused on this portion of my game with the whole GameObject Tree vs Terrain Tree.
     
  2. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,304