Using the OnHit Event

A How To Guide to for using the OnHit Event in Blueprints or Code.

Windows
MacOS
Linux
On this page

If you are creating a game that involves any kind of damage to a player, enemy, or object, chances are you will run into the situation where you need to determine if they were hit by something and if so, who hit them, where the impact point was, or other information regarding the hit detected. The OnHit Event will provide this information and much more when the collision occurs in which you can use the data to drive changes in your game be it affecting health, destroying an object, or other gameplay related actions.

Implementation Guides

ue4_icon.png

Using the OnHit Event in Blueprints

Using the OnHit Events to fracture a destructible mesh as well as applying impulse to move it.

Using the OnHit Events to fracture a destructible mesh as well as applying impulse to move it.

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback