Using positional tracking to move the player

Hello guys, thanks for your time.

Sorry if it is an answered question, but I am trying to figure out how to move my character using the positional tracking from the rift. I am working on a sort of first person temple run style game, (infinite runner) and I want the user to be able to move the avatar side to side by moving his head. I think it would be cool to allow them to dodge objects in such a way. I honestly don’t have the first clue as to how I would implement this. My C++ is abysmal at best, but I have had a decent amount of success with the blueprint system. Is there a “get rift location” type of node that I could compare with the head position or something like that? So for example, if (rift.position.x) > 0.5 then add movement (direction = x, speed = 1). I’m probably completely wrong but hey, doesn’t hurt to try!

Hi there, i am actually going to release a demo very soon of a new control scheme that i implemented, which uses what you describe as part of the solution. Been a bit delayed with some 0.4.3 problems though…

Anyway this part is quite simple to do in blueprints, i think something like this can get you started (in your character blueprint):

The only problem is that the position of the HMD is in front of your face, not where your neck rotation happens, so if you turn your head to look right for instance you would move as well. If you want to compensate for that it gets a little bit more complicated.

This is fantastic. It feels great to solve problems that no one has ever solved before, and to innovate in a medium that has no set rules. I will mess around with the code and see if I can come up with a solution that feels good.

I get sim sick just thinking about it. But can’t hurt to try :slight_smile: