health indicator with character body material(CS:GO style HP)

Step 0.

Let's make CS:GO health indicator.




Step 1.

 It's very easy to make the system in Unreal Engine 4. 'Absolute World Position' node is the key feature.

 Make a material function. Copy MaterialAttributes Input/Break/Make/Output nodes from other material if possible.

 In this time, modify the EmissiveColor only.



 Do NOT calculate health ratio in the material. Just calculate it once in the character blueprint.

Step 2.

 Duplicate 'M_UE4Man_Body' Material. and insert the material function we made just before.



Step 3.

 Make a character blueprint.
 Assign new material to the mesh and set scalar parameters.






Comments

Popular posts from this blog

Liquid material in a bottle

How to Make Circular Progress Bar(or Rounded Rectangle)

MatCap material