make trees transparent when collided with camera??

hi there,i am making a third person camera for my game,
got problem:

just want to turn gameobjects to transparent when they are colliding with current camrea,(like many other games,so the camera can see through)

i know i can use onColliderStay/ontriggerStay to change material’s alpha value of the gameobject,but

how to do this in a efficient way? i guess there will be a shader to do this?

Any of the shaders with transparency should allow you to do this. I’m not aware of any particular performance issue with changing the alpha value.

yeah, just make sure you choose any of the transparent shaders, and then just set a trigger in your code that changes “gameObject.color.a”

what if i want to change the alpha value of the trees on the terrain???

There’s no documented way to do this, but there are undocumented API calls to access some of the tree data (as mentioned in this thread). However, since they are undocumented, you use them at your own risk and UT offers no support with this.