RTS Multiplayer Game Series

2.Unit setup & Decal Material Selection



Create a BP character, called Parent unit class
Reduce capsule size to 30, 10
image.png
Add decal component, called SelectionDecal
rotate Y 90 degree, and reduce size to 10, 20, 20. move it down to bottom of capsule
move down with Z axis -30, not 20 (or else won’t see the decal when put in scene)
image.png
Choose the mesh, untick Receive Decals (to hide the decal)
image.png

R click on the parent BP, create child BP class, called Unit_style_1
image.png
open it, change the mesh, scale down, and rotate Z -90
image.png
Duplicate style 1, name as style 2.
change another mesh different from style 1

Drag style 1 and 2 BP in scene

Create new material, called Selected_Decal_MAT
Change Material options as follow
image.png
Hold keyboard 3, L click to create 0,0,0 node, change to green color
image.png
Click apply
image.png
drag the material in scene, scale down as follow size (to test how material visually looks, delete it after test with the MAT graph below)
image.png
Modify the MAT as below in graph:
Linersine node is to let time (3 sec) runs value between 0 and 1 (for flashing effect)
image.png

Back to parent unit class BP
Selection decal component, change the material to what created

Now the decal is seen flashing in scene on the characters.
To make decals only visible when the characters are selected:
go to Parent unit class → SlectionDecal, untick visible
image.png

Change anim class on mesh of unit style 1 and 2
image.png

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.