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"

Prevent linetrace from shaking when camera moves?

Hi, I call LinetracebyChannel in tick to detect actors. I have a camera in the vehicle class. And the range of Linetrace is based on the WorldLocation of the camera. When vehicle runs, the camera moves with it. At this time the line shakes because of the calculation of camera's world position. I know there are may have some advanced methods in latest versions, how to make the line stable in version 4.11?alt text

Product Version: UE 4.11
more ▼

asked Mar 02 '17 at 06:10 AM in Blueprint Scripting

avatar image

27 10 15 22

avatar image kurosu143 Mar 02 '17 at 08:05 AM

It should not shake unless the camera is shaking. It should only point where the camera is pointing. Also, that GetForwardVector is not necessary just plug the GetWorldRotation directly to the x3000.

avatar image pcjjdy Mar 02 '17 at 10:21 AM

I chose "Draw Debug Type" to "for one frame" and print the vector of camera. I found vector of camera did't change at all. However, the red line shakes when vehicle moves. I set another camera to watch the camera emitting a line and the lines shakes indeed.

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

1 answer: sort voted first

alt text

I did this, and my camera didn't shake. alt text

Try to get Forward Vector directly from camera, not from rotation.(I did circle around myself :))

2.png (43.9 kB)
1.png (400.9 kB)
more ▼

answered Mar 02 '17 at 10:51 AM

avatar image

630 12 15 52

avatar image pcjjdy Mar 02 '17 at 11:48 AM

Hi, the shaking condition is move the camera(change the location, not the rotation). I will try your method tomorrow and u can also try to change the location of the camera and watch the line movement.

avatar image Erumaru Mar 02 '17 at 11:49 AM

I changed location and rotation.

(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