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"

VR trace only downwords the camera up vector without rotation

Hey everybody, i hope you can help me again.

I try to make a sphere trace from my camera (VR) always 150 units downwards it's up vector.

My approach was like this:

I created two static meshes in my Pawn. First one for the trace start point and the second 150 units downwards the startpoint and called endpoint. Then in blueprint i construct the trace between these points. After that i make start and endpoint a child of my camera. But everytime I move my head the points rotation is the same. But I don't want them to take my head rotation. They should only take the on top of all placed capsule rotation.

I hope you can help me.

Product Version: UE 4.18
Tags:
more ▼

asked Jan 29 '18 at 11:38 AM in Blueprint Scripting

avatar image

Sniw
8 2 3

avatar image Sniw Feb 06 '18 at 12:24 PM

Is there really no answer, or did I make my question too complicated? I try to explain it again with a picture. I try to create a VR scene:

For a part of the project I would like to make a line trace always in the reversed direction to the UP Vector of my capsule. In addition, the position of this LineTrace should always update with position of the the camera. However, only the position. It should get any kind of rotation from the Capsule.

I unfortunately don't know how to explain it differently... i hope you can help me. Please. alt text

01.png (765.7 kB)
avatar image Dune Feb 06 '18 at 12:58 PM

The issue here seems to be that you have attached them to your Camera. This means, if you look up, the downward vector will change to in theory, be coming out of your chin.

You can either attach them just to the capsule, or why not use the inverse of the Pawn's UpVector (-GetUpVector()).

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

1 answer: sort voted first

Is it possible to keep/store the distance between the two spheres? If I use that, both are set to exactly the same position and lose their distance to each other ... :(

more ▼

answered Feb 07 '18 at 11:18 AM

avatar image

Sniw
8 2 3

avatar image Sniw Feb 07 '18 at 11:18 AM

Is it possible to keep/store the distance between the two spheres? If I use that, both are set to exactly the same position and lose their distance to each other ... :(

(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