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!

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.