How to detect if a pawn is touching an actor
I am in first person and I would like to have words appear when I touch a cylinder. I know how to do the words I just don't know how to detect when the pawn touches the actor.
asked Jul 03 '18 at 04:18 PM in Using UE4
I'm not too sure what you mean by "touch", but it sounds to me that you mean when a player actor makes contact with another actor. You can accomplish this by making an OnHit event. Just make sure that both actors have Generate Hit Events ticked in their collision settings. Then you can write out the OnHit event logic in BluePrints or C++ depending on your project.
Here is a tutorial from the UE4 documentation:
Using that you can deduce how to use it for your project.
Another option would be to make a overlap event using trigger boxes or capsules. This works when the actor enters the collision box or capsule and you could make a box or capsule around the cylinder in your project so when the actor enters the box the text appears.
Here is some documentation on Events:
answered Jul 03 '18 at 04:35 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here