Advanced Touch Bending on Grass/Plant Models For Physics Interactions Between Player Character, Vehicle Or NPCs With Vegetation
Quote from terraunity on December 13, 2021, 9:33 amDid you know that TerraWorld comes with an advanced grass/plant touch bending feature? It means your character/vehicle/NPC can interact with placed vegetation and grass blades in scene physically.So to have touch bending on painted vegetation in the world, simply add "BendGrassWhenEnabled" or "BendGrassWhenVisible" component to any moving objects you want to have physics interactions with (Max. is 16 benders): To quickly test grass touch bending in TerraWorld, add Shooter script to your camera and in Prefab slot, insert TerraBall prefab which comes with the package and go to the game, so each time you press Control on keyboard, it will fire a ball into the scene with setup bender on it:
In order to have live feedback of benders when you are in the editor, simply create an empty gameobject in scene and add component "Grass Bending Editor" to it so all bendings will take place even in the editor:
Here is the bending in action in the editor:
We'll add timed trails later so that bending will remain based on user-defined time and gets back to initial state after that time.
Here is the video in action:
More on Grass Layer in TerraWorld:Grass Bending on 3rd Person Character:
Dense Grass Rendering:
How to add Grass layer in TerraWorld scenes tutorial:
Dense Grass & Vegetation Scattering Promo:
To quickly test grass touch bending in TerraWorld, add Shooter script to your camera and in Prefab slot, insert TerraBall prefab which comes with the package and go to the game, so each time you press Control on keyboard, it will fire a ball into the scene with setup bender on it:
In order to have live feedback of benders when you are in the editor, simply create an empty gameobject in scene and add component "Grass Bending Editor" to it so all bendings will take place even in the editor:
Here is the bending in action in the editor:
We'll add timed trails later so that bending will remain based on user-defined time and gets back to initial state after that time.
Here is the video in action:
Grass Bending on 3rd Person Character:
Dense Grass Rendering:
How to add Grass layer in TerraWorld scenes tutorial:
Dense Grass & Vegetation Scattering Promo: