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"

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. 

How would I create an in-game joystick that can be moved around via the motion controllers and return axis values?

I've been messing around off and on in UE4 with my Vive for a few months. Right now I'm trying to create a simple flight sim. I have a basic flight model done that I'm happy with at the moment. What I'm having trouble with now is how I would even approach adding an in-game joystick that can be moved with the Vive motion controllers and give me information back to roll and pitch the aircraft. Any help is appreciated. Thanks!

Product Version: Not Selected
Tags:
more ▼

asked Mar 25 '17 at 12:33 AM in VR

avatar image

Nuke36
1 3

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

1 answer: sort voted first

First you need to find out when the player toches the joystick. When you store the hands world transform you can find out each tick, how much the player hand has rotated. I dont know if the vive controllers are precise enough to get the correct rotation of the hands but if, it is very easy to find out how much they have rotated and you could use this information to calculate the joysticks rotation. You also could use the distance the hand has moved since touching the joystick to calculate the rotation.

The actual joystick is pretty easy to make, just make a skeletal mesh and create a Blend Space or an Aim Offset for it where you can map rotation to poses just like you would do with a character. Then you just need a collision shape to figure out when the player touches the stick.

more ▼

answered Mar 25 '17 at 01:16 AM

avatar image

SteffM
427 12 4 22

(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