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"

Line trace hit value won't stay true

I'm trying to trace each frame to check if a hit has occurred with the world, changing a variable to "true" until the trace is no longer hitting. The problem is when a hit occurs, the variable changes to "true" for one frame, then stays false while the line is still hitting the world.

This seems like it would be a common issue, but I unfortunately have found no information on this problem...

alt text

Any info would be much appreciated.

Product Version: UE 4.10
Tags:
more ▼

asked Feb 07 '16 at 10:46 AM in Blueprint Scripting

avatar image

zmalsberg
36 2 7 11

avatar image MrGrr Feb 07 '16 at 11:18 AM

Can you try setting the Draw Debug type to persistent, and seeing the effect in game? What type of actor is doing this trace?, is it maybe moving, or the other object moving? From what i can tell the trace is only 50 units up from the trace location(50CM), is this intended? any chance of a screenshot example of the issue?

avatar image zmalsberg Feb 08 '16 at 11:34 AM

Found my problem, 'Trace Location' is a sphere component floating below the actor for the end location, +50Z added to get the start of the collision capsule. All I had to do was swap the Start and End values, moving the sphere into the actor, and subtract -50 from the End location...

I'm not sure why it didn't work before, but your suggestion helped me think to swap the values, so thanks.

avatar image Narghile Feb 07 '16 at 11:52 AM

You could always use a Print String to check values while you are testing.

Narg

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

0 answers: sort voted first
Be the first one to answer this question
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