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"

Get hit direction from CapsuleTraceForObjects?

Hello I have a capsule trace for my character that originates from the center, I'd like to be able to detect if the character is colliding on the wall from the left or right.

How would I go about getting this information from the hit result?

The trace does not rotate with my character so maybe that is why I'm having trouble, if this is the case I'd like to know how to go about doing this too

Thank you!

Product Version: UE 4.21
more ▼

asked Dec 20 '18 at 09:36 PM in Blueprint Scripting

avatar image

112 3 5 8

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

1 answer: sort voted first

Don't really understand why you would need trace for that, but that's fine. Take a look at the first answer here: https://answers.unrealengine.com/questions/848566/check-which-direction-the-player-was-hit-from.html , is that helpful?

more ▼

answered Dec 20 '18 at 10:34 PM

avatar image

1.8k 12 7 9

avatar image Jinkuu Dec 21 '18 at 04:08 AM

This is exactly what I needed thank you!

The system I have is a wallride so I needed to tell what side it was colliding on in order to play the corresponding animation and how the character would rotate.

I used two line traces at first but the capsule was more accurate in keeping rotation around surfaces that weren't flat.

(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