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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How to shift PC Focal Location

Hey Answerhub,

I'm using my player controller's GetFocalLocation() vector for my line trace. However, the focal location is a bit too low for my character, as the camera/eye height is set a little higher.

Does anyone know how to get a higher focal location? I've tried adding another Z vector to the focal location vector, but that doesn't seem to work.

alt text

Product Version: UE 4.10
Tags:
capture.png (1.6 MB)
more ▼

asked Sep 23 '16 at 06:52 AM in C++ Programming

avatar image

Mookaroni
569 21 9 35

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

1 answer: sort voted first

Check out this example in the doc on how to use a line trace without using GetFocalLocation(), that way you can start you line trace from any point to another. P.S. the "1500" value they used specifies the distance, if your object is really far away you might need to use a higher value. https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/

more ▼

answered Sep 23 '16 at 06:57 AM

avatar image

Night Watcher
1.7k 43 12 71

avatar image Mookaroni Sep 23 '16 at 07:22 AM

Looking to use line traces in C++ instead as a way to learn the language.

I got what I was looking for by replacing

 GetFocalLocation()

with

 PlayerCameraManger->GetCameraLocation()

in the PlayerController class if anyone was interested.

Much appreciated NWatcher

(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