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"

Stop rotating camera with HMD in Yaw Rotation axis

I am working in both C++ and blueprint to create a VR experience using the HTC Vive.

In this experience I would like the user to be able to press and hold a button on a motion controller and have that stop the rotation of the camera in the yaw axis. This is so that they can move around in a way similar to this: https://punchey.itch.io/cosmic-wandering

Most of my attempts to halt the camera from moving / rotating in any plane have failed. This was using the "Enable HMD" and "Follow Hmd Orientation" nodes. I have been able to teleport it by teleporting the pawn itself in blueprint.

At this point I am wondering if trying to stop the tracking on the headset was the correct way to go about it, it probably wasn't.

Unfortunately I have not got the project to hand so I cannot show you what I have got (yet - I intend to update this post tomorrow) but from memory:

  • I have VR pawn which has a capsule collider as its root component then as child components I have a scene component (like VROrigin in the example) with a camera as a child component of that, I also have a MotionController component on the same level as a scene component with a static mesh as a child of that to show the controller, and a C++ script attached to the whole thing which handles my teleportation.

  • In the blueprint for my VR pawn I use the Motion Controller button presses (IsPressed, IsReleased) to find out when a button has been pressed to activate the teleport / cosmic wandering / other interactions.

Any help on any of my issues would be greatly appreciated.

Product Version: UE 4.14
more ▼

asked Nov 30 '16 at 09:27 PM in VR

avatar image

13 1 2 5

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

1 answer: sort voted first

Didn't realize there was a "reset orientation and position" blueprint node, it was exactly what I was after.

For anyone else wondering how to do it, this is in my VR_Pawn blueprint. The Wanderer Rotation is just a float created in BP and the input manager is unnecessary but I wanted to show all of how it's done. The white pipe coming into GetLGripDown is the event tick.

alt text

alt text

Now the only problem with it is that it's not blurred so it's quite sickening to use, I'm going to fix that shortly.

Also, I wasn't compensating for the offset of the headset within the chaperone, so I fixed that and added blur and now it looks like this:

![alt text][3]

more ▼

answered Jan 09 '17 at 05:14 PM

avatar image

13 1 2 5

(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