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 do i line trace along a surface normal?

alt textalt text ![alt text][4]

I am doing an auto cover system for my fps character and i detect cover by using these box traces. But to detect the end of the wall it would work a lot better if i knew how to always start the line trace paralel to the wall, from the outside to the inside(front of player). Can someone please help me?

[4]: /storage/temp/264443-6.png

Product Version: UE 4.21
Tags:
1.png (1.3 MB)
5.png (806.6 kB)
6.png (182.5 kB)
2.png (1.3 MB)
more ▼

asked Jan 07 '19 at 02:08 PM in Blueprint Scripting

avatar image

ken09block123
8 1 4

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

1 answer: sort voted first

If you don't want to worry about orientations, you should use a line trace instead of a box trace.

If you want your box to run flat against the wall, then you need to set the trace orientation based on that wall's surface normal (Hit normal).

I wrote out a solution that should work for you, and explained it as I went on stream.

surface normal tracing

ue-answerpic47.png (590.0 kB)
more ▼

answered Jan 07 '19 at 04:46 PM

avatar image

BenVlodgi
2.1k 38 17 52

avatar image ken09block123 Jan 07 '19 at 06:50 PM

Wow thank you so much! this just solved my problem! and very well explained!

avatar image BenVlodgi Jan 07 '19 at 08:43 PM

Hey! glad this helped! You should upvote, and mark as answer :)

(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