How do I access a HMD's Camera Actor's position and rotation so that I can utilize LineTrace?

anonymous_user_fa7f2a2b
Mon, 20 Mar 2017 12:45:48 +0000
XR Development

Hi All,

I’m trying to create a VR experience using the Rift.

Here’s my issue: I’m trying to access the position of my HMD during gameplay so that I can create a LineTraceByChannel from it. Ultimately, I plan to use this LineTraceByChannel in order to determine what the player is looking at it.

However, the Camera Actor which I believe represents the position of my HMD only appears when I Play the scene. For this reason, I cannot make a reference to it in any of my blueprints.

I imported the First Person Character Blueprint into my scene in order to access its camera. After playing with the settings a bit, I got the Camera component of the First Person Character to shoot a line trace.

However, this camera is still separate from the Camera Actor the HMD seems to use when I play the scene.

How can I make the Camera the HMD utilizes and the camera that is part of the First Person Character the same thing?

Alternatively, how can I access the Camera Actor that represents my HMD when I run the scene? (It keeps disappearing when I stop the scene)

I’m not sure which template I started in, but I believe it was the default.

I have tried the following:

Locking the First Person Character’s Camera to the HMD.

Making the VR Marker component of the First Person Character the point from which the LineTrace is drawn.

Thanks,

4 posts - 1 participant