How to make walk through plants?
There are two possibilities:
1) if your plant is a misc_model:
do NOT set spawnflag 2 (autoclip), your model will be non-solid
2) if your plant is made out of brushes:
use a shader with
surfaceparm nonsolidInteresting example:
I made a potted plant model. The pot and the plant's trunk
can not be wallk-through (nonsolid) so, I gave the model
spawnflag 2.
I made a special shader for the leaves, because
they ARE non-solid, and the texture also uses an alpha
channel (transparency)
// plant leaf 1 with alpha channel
models/mapobjects/vega/plant/leaf1
{
surfaceparm nomarks
surfaceparm nonsolid
cull none
{
map models/mapobjects/vega/plant/leaf1
alphafunc GE128
depthwrite
rgbGen identity
}
{
rgbGen identity
map $lightmap
depthfunc equal
blendfunc filter
}
}