i wanted to make my game more realistic by making some tree or grass moving and i have no idea where to start with.pls teach me thx
If your trees are created directly into Unity, you can use Wind Zones.
Use a vertex shader.
In the vertex shader, move the vertex’s position by a random amount each frame. I’d use a texture lookup to get the amount of movement, (the texture could be tiling fractal noise) using the vertex’s XYZ and time (see shader ref) for the lookup coordinate.
Although, I’m not sure if texture lookups are supported in vertex shaders.
To add realism, you could weight the tips of the branches at 1, and the bases at 0, and use them in the shader. That way leaf tips move more than the branches.
Hi best thing is either particle effects or vertex animation I would say. Particle effects are built into standard unity and vertex animation is supported through products like that great one Megafiers
Can use the terrain editor it uses billboard particle effect…
It’s the video here that demonstrates modifying trees, he’s saying something about bend in the inspector: [link text]VTC Player - Introduction to Game Development Using Unity 3D, Adding Trees but you have to sign up first