Search Unity

How can I make my trees move in wind, while I can interact with them?

Discussion in 'Editor & General Support' started by eric56379, Oct 22, 2014.

  1. eric56379

    eric56379

    Joined:
    Mar 11, 2014
    Posts:
    89
    So, I have trees moving in the wind, but I always walk through them and stuff. So I then put trees into the scene. And they are interactable. If you play Rust, then you will know that you can see that the trees move and you can gather wood from the trees. I am making a game kind of like that. So, it is possible that I can do this? Or is it impossible, and I will have to find a difference way.
     
  2. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    I am confused at what you have already tried.

    Have you tried: Get the moving in the wind trees into the scene, place an empty game object as a child, add a collider to that game object and use it as a trigger to interact.
     
  3. eric56379

    eric56379

    Joined:
    Mar 11, 2014
    Posts:
    89
    Oops, sorry if I didn't state it clear enough.

    But the game is going to be filled with a ton of trees. At least 5,000 trees in the game. I will restate it hopefully a little better:

    I would like to use the tree painter thing because I want trees to move in the wind, and I also want to interact with them.
     
  4. LadyAth

    LadyAth

    Joined:
    Jan 17, 2014
    Posts:
    158
    I might be wrong, but I don't think you can interact with painted trees. What I would suggest is to paint your scene and to then add prefab trees amongst the painted ones that you can then set your scripts on, etc. Maybe make them a different type of tree than the others so the player can identify them. That way you can get a lot of 'filler' and then either areas of prefab trees or intermittent trees that are placed as prefabs with all the functionality you need on it. Make sense?
     
  5. eric56379

    eric56379

    Joined:
    Mar 11, 2014
    Posts:
    89
    Yes, thanks.