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"

Third Person Firing (Line Trace)

Hey all,

I am trying to get some generic firing working for a third person camera. I feel like I'm super close. I got the line trace starting at the weapon's "muzzle" socket and shooting out at a "weapon range" variable. However, the hit end location doesn't quite line up with the cross hair (in the HUD, center of screen). Can anyone provide an assist here?

Thanks in advance!

alt text

alt text

Product Version: UE 4.12
Tags:
not quite on.png (99.9 kB)
close.png (431.2 kB)
more ▼

asked Aug 29 '16 at 03:54 PM in Blueprint Scripting

avatar image

LordTorsten85
43 5 7 15

avatar image Max Biishop Jun 20 '18 at 01:23 AM

Hey, i know this was posted a very long time ago now. but i was wondering if you ever got this fixed. I am now having the same problem with my Line tracing.

Thanks if you can reply

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

2 answers: sort voted first

I havent touched this thing in a long time, but I'm pretty sure it was because I wasn't deprojecting from the HUD to 3D space.

more ▼

answered Jun 20 '18 at 05:22 AM

avatar image

LordTorsten85
43 5 7 15

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

Blueprint above contains line trace with start point from weapon socket to scaled forward vector from it. That forward vector will not match crosshair projection because it is not depended on it. The end of trace from weapon must be determined by another trace from center of the screen. Additionally your setup depends on how you manage fact that camera can observe something that trace from weapon cant hit properly. For example when character is taking cover behind wall. That remind me an article from Gamasutra about TPS aiming link text

more ▼

answered Jun 20 '18 at 05:26 AM

avatar image

TVinforest
454 15 13 21

(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