O'Reilly logo

Mastering Game Development with Unreal Engine 4 - Second Edition by Matt Edmonds

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding HMD controls

Now that we're playing in the level and can teleport around with the thumbstick and if you can get close-enough to the blue boxes you can grab them and throw them using the trigger on the controller, it might be nice to move around in the level a bit without having to use the teleport exclusively. One way we could even free up the entire thumbstick for other uses is to make motion based on your head's orientation, using the HMD (Head Mounted Display) orientation itself as a means of conveying input.

However, this means the player can't really look up and down anymore freely without moving; but we'll put in a fix for that too. Let's get the player moving around via blueprint first using some simple logic based on the camera ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required