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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Is there a way in BluePrint to get Tilt Input from a single Motion Controller for VR? (Of 2, vive)

Hi, I'm attempting to map some movement controls to the tilt of a single motion controller(vive). I want to be able to detect tilting one controller fwd-back, left-right, then use those inputs for movement of an actor. Is this even possible in Blueprints?


Product Version: UE 4.13
more ▼

asked Oct 20 '16 at 07:56 PM in VR

avatar image

16 1 3 5

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

1 answer: sort voted first

Yes, it's 100% possible in blueprints. This question is less of a technical capability question and more of a design and implementation question.

If you look at your motion controller component, you can get its position and orientation at that instant in time. You'll be interested in looking at the yaw, pitch, and roll values.

It sounds like you're looking for a change in yaw/pitch over time. That's the key there, that it's over time. That should suggest to you that you're going to be keeping a history of values and watching them as they change over time, and then interpreting the change in values as a form of input. Good so far?

So, the next few questions you'll be asking is, "How do I do that?" and "where do I store these values?" and "how do I get rid of old values?" and "how do I interpret my values correctly?"

To store the values, you'll want to put them into some sort of data structure, such as an array. You'll need to decide how many values you need to store in order to get good data. 10 frames? 100 frames? 1000? I can't tell you this value, you have to find and test for it yourself. But, let's pretend that we're using 10 frames of data so that we can look at how we can discard old data.

Normally, you would use a data structure called a "queue" with a length of 10. When you insert items into this queue, you add them to the "front" (in this case). If your queue already has 10 items in it, then you remove the last item and then insert another. The good news is that you can implement a queue within an array by using a "circular queue" (https://en.wikipedia.org/wiki/Circular_buffer) and just overwrite the next index value instead of dequeuing it.

So, I answered three out of four additional questions you'll run into, and the last question is a question I can't really answer because the answer is going to be "it depends on your implementation / requirements".

Good luck!

more ▼

answered Oct 21 '16 at 03:04 AM

avatar image

824 50 29 73

avatar image JulsIII Oct 21 '16 at 04:22 PM

Thank you so much for this info! Voted! You are spot on - I do want to track these inputs over time. I use arrays often but not "queue", so I will begin my researching on the topic immediately. As for the last inquiry - I plan to implement by using these stored inputs to signal "add movement input" or "add force/impulse" to or I think there is probably a better way to translate my actor left-right,fwd-back (i just need to do some more research). The tricky part is that these movements are added to an actor already in a set state of motion - actually all actors are moving forward on an infinite track that builds and destroys itself. This is going to hopefully be a highway outrun vr game! Anyway, Thanks so much for the help!- it will get me started! Any other info appreciated but thank you for all you've already provided!

avatar image JulsIII Oct 21 '16 at 05:31 PM

I don't think there is any way to call a circular array through blueprints, unfortunately. Unless I'm missing something?

avatar image Slayemin Oct 24 '16 at 08:30 AM

No, there isn't a "circular array" data structure. You have to implement it yourself, which is really straight forward and simple... you keep a second integer variable which is the current array index. Call it something like... "NextIndex". You should be able to look at the wikipedia link and figure out a way to implement it using only blueprints. 100% possible, 75% easy.

(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