[UE Material] The effect of the character touching the air wall

Effect

step

1. Create a new project, create a Basic level, and add a third-person game resource to the content browser

2. Create a new material parameter set, named here "MPC_Vector"

Open "MPC_Vector" and add a vector parameter

3. Create a new material, named here "M_Wall"

Open "M_Wall", set the blending mode to translucent, and check Double Sided

Add a "Collsion Param" node in the material graph, select "MPC_Vector" in the details panel, and select "Vector" for the parameter name.

The material function "Motion_4WayChaos" was searched in the engine

Drag it into the material graph of "M_Wall"

Continue to add the following nodes to the material graph

The texture of the "Texture Object" node is "T_Perlin_Mask"

You need to check "Show plug-in content" to find the texture "T_Perlin_Mask"

4. Create a material instance for the material "M_Wall"

5. In the world scene settings, set the game mode reload to "BP_ThirdPersonGameMode"

6. Open the third-person character template blueprint "BP_ThirdPersonCharacter"

Add the following nodes to the event graph to modify the vector parameter values ​​every frame

7. Place a plane into the scene and set the plane's material to "M_Wall_Inst"

The effect of running the game at this time is as follows:

You can adjust the following parameters in the material instance to achieve different effects

Reference video:

https://www.bilibili.com/video/BV1m34y1P7KS/?spm_id_from=333.788&vd_source=36a3e35639c44bb339f59760641390a8

Guess you like

Origin blog.csdn.net/ChaoChao66666/article/details/134980778