x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.19
Tags:
more ▼

asked Jul 03 '18 at 04:18 PM in Using UE4

avatar image

MeganGood24
1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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:

https://docs.unrealengine.com/en-US/Gameplay/HowTo/UseOnHit/Blueprints

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:

https://docs.unrealengine.com/en-us/Engine/Blueprints/UserGuide/Events#eventactorbeginoverlap

more ▼

answered Jul 03 '18 at 04:35 PM

avatar image

Zilphy
216 3 6 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question