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 get multiple hit locations on same actor with trace at once?

Im trying to create a bullet penetration, but Im not having any luck with traces so far. As it stands, a trace only returns one hit location per actor, which means there is only an entrance location but no exit location. This makes it very hard to get the length of the vector between where the bullet would enter, and where it would exit to compute whether the bullet will or will not exit.

So, is there any way to have a trace get multiple hit locations on a single actor with a single line trace?

Product Version: UE 4.10
Tags:
more ▼

asked Feb 05 '16 at 10:38 PM in Blueprint Scripting

avatar image

Shirk
245 41 52 64

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

1 answer: sort voted first

yes, you can do a second line trace that returns a second point. so for example in your first line trace, you have access hit location and hit normal i believe. if you build a new trace that starts at a point created from the original hit normal, following the same vector direction to some point behind the character, you can then build a new trace that starts from there and traces back toward the source of the first trace's start point. so if your original trace hit returns true, do a second trace hit from behind using the original trace data.

so just to recap/clarify, if your first trace hits, get your hit normal, multiply by negative 100 or something, and add that vector to your hit location. then use that number as a start location for your second trace, and use the original hit location from the first trace as the end location of the second trace.

more ▼

answered Feb 08 '16 at 04:34 PM

avatar image

paradoc
1.2k 49 31 87

(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