I am working on trying to get my Oculus Rift to control a character.
Basically what I want it to do is:
- If I tilt my head downwards then this would control the characters Pitch.
- If I tilt my head to the side then this would control the characters Roll.
- If I turn my head to the side then this would control the characters Yaw.
The only 2 inputs from the game-pad controller will be acceleration and braking via the Left and Right trigger buttons.
Any help will be much appreciated.
are you planning on using Blueprints or C++?
If using Blueprints you can get the HMDs Orientation:
Use that Rotator to your liking and feed it into your SetRotation function of your character.
In case that doesn’t work you should also be able to get the rotation from simply getting the rotation of your Camera, if it is locked to HMD, which it is by default.
EDIT: Yaw/Pitch and Roll of the GetOrientationAndPosition Function are already equal to what you’d like to achieve, so I removed the part about splitting it.
Thanks for the quick response.
I am quite new to Unreal so have very little knowledge of Blueprints, but I do want to do this with Blueprints.
Is there a way that this can be implemented into the Flying Template in UE 4.13?
I just had a quick look into the Flying Template and it seems to be pretty easy: Just feed the “Current yaw speed”, “Current pitch speed” and “Current roll speed” variables with the input I mentioned above.