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"

Detect the normal of a polygon face

Hello everyone.

I am trying to deflect a non physic projectile with a pipe, So I thinked to get the normal of the face the projectile hits using a linetrace, but when I get the normal that always returned me the normal of the object, not the normal of the impact face.

Anyone knows how can I detect that normal to send the projectile in that way? I am using blueprints for all of this.

Thanks for your time

alt text

Product Version: UE 4.20
Tags:
sin-titulo.png (106.5 kB)
more ▼

asked Aug 10 '18 at 11:12 AM in Blueprint Scripting

avatar image

Bahamut1892
22 1 2 9

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Check if this helps:

https://answers.unrealengine.com/questions/180566/how-to-get-the-surface-normal-from-line-trace-hit.html

Edit: In short - the normal should be correct. To draw it correctly, however you should make:

 Start = ImpactPoint;
 End = ImpactPoint + ImpactNormal * 100.0f;
 //The *100 is just because the ImpactNormal is 1 centimeter long by definition and you might not see it.

Also, you don't need the second LineTraceByChannel just to draw a line. You can use DrawDebugLine instead.

more ▼

answered Aug 10 '18 at 11:56 AM

avatar image

dZh0
1.2k 6 5 8

(comments are locked)
10|2000 characters needed characters left

Non physics actors can still use Collision hit results and dont have to trace in addition to that. The collision should give an impact normal

more ▼

answered Aug 10 '18 at 12:55 PM

avatar image

mightyenigma
3.4k 16 17 12

(comments are locked)
10|2000 characters needed characters left
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