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"

Line Trace Not Generating Hit Event on the Hit Actor

Hey guys,

I've got a line trace shooting out from my camera every frame for a short distance, this is meant for interactable objects so I can interact with the correct object. I have set my own line trace channel to "Interact" and set it by default to ignore, but set the interactable objects to Block. My line trace is hitting the correct objects as expected, but no Hit Event is being triggered from the hit actor.

I've posted some screenshots to show what sort of thing I'm doing. At the moment it is a simple message to display when it receives a hit, however I'm getting no such message from the actor. alt text

Product Version: Not Selected
actorhit.png (693.0 kB)
noevent.png (66.5 kB)
more ▼

asked Jan 16 '19 at 10:28 PM in Blueprint Scripting

avatar image

46 3 1 6

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

1 answer: sort voted first

This is the other type of hit — a physical one. The trace hit looks like this: alt text

tracehit.png (69.1 kB)
more ▼

answered Jan 16 '19 at 10:34 PM

avatar image

1.8k 12 7 9

avatar image Tisreece Jan 16 '19 at 10:40 PM

I already have that set up, my line trace is working fine.

Unless you're suggesting I need to do something specific with the hit result? Because as far as I'm aware the hit result should appear the same in the Event Hit on the actor itself.

I have tested using print strings and my line trace along with my Hit results on that end are working fine, it returns a true when it's a blocking hit and the hit actor is also correct. The issue is that on that actor I'm hitting it is not generating an Event Hit

avatar image Tuerer Jan 16 '19 at 10:50 PM

It's not supposed to. Event Hit is generated when one actor physically hits another (like if you as a character run into it). Trace hit does not generate a Hit Event per se for any actor.

What you need to do is take the Actor pin from the Break Result and work with that. Cast it to the class that contains that PrintString and then call the functions you need. alt text

tracehit.png (107.8 kB)
avatar image Tisreece Jan 16 '19 at 10:52 PM

Hmm, this is not ideal but I'll work with it, thanks for the info :)

avatar image Tisreece Jan 16 '19 at 11:07 PM

Just incase anybody else comes across trying to do a similar thing to me, then I just want to share my current setup. Might not be totally optimised.

This means that only objects that are being looked at (while also obviously being in rage to interact with) are being interacted with.

alt text alt text

001.png (72.0 kB)
002.png (110.0 kB)
(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