Hitpoint
Hitpoint pops up a floating number, such as the damage of a hit or +25 from a pickup. The number faces the camera and disappears after a moment.
Add Component: Glowing Rifts > Misc > Hitpoint
๐งฑ Setup
- Add
Hitpointto the object that gets hit. - Assign a number prefab with a TextMeshPro text. The package has one in
Examples/Common/Prefabs/Hitpoint.prefab. - Hook the
Health’s On Damage Data Received toHitpoint.ShowDamage.
๐ Settings
| Field | What it does |
|---|---|
| Lifetime | Seconds before the number disappears |
| Hitpoint | The number prefab |
๐ฎ Actions
| Method | What it does |
|---|---|
ShowDamage(DamageData) | Shows the damage where the hit landed |
ShowText(string) | Shows any text, such as +25 or Blocked |
Tip
Step by step: Show Damage Numbers.