Hi everybody. I am working on a mech game, and I am trying to properly position the player inside of the cockpit on begin play. I am using blueprints for the game so far. My VR pawn follows this structure: ->Capsule
->VROrigin
->Camera
I have been trying to set the cameras world location equal to a scene component called “Pilot Seat” parented and position to the Mech’s chassis. This doesn’t seem to do anything at all. As a side note, I currently attach the VR pawn using AttachToComponent, where I am setting everything to World at the moment, other than Location Rule which is “Snap to Target”.
The problem I currently have is that although the mech seems like it is in the center of my room scale, my headset can be wherever in the room. I want the headset to be inside of the mech regardless of its position in room scale, as this game will be a seated experience. Maybe I am going about this the wrong way all together?
Any responses would be appreciated. I don’t feel this is overly complicated as a lot of VR games have this. I know that it is a quick fix I am just not sure what it is. Thanks.
As far as I know you can’t set the camera’s location manually because the engine will snap it back to it’s room scale position on the next frame. Instead what you do is move the root component of your pawn. To get the right location so the camera lands in your pilot seat, you adjust the location by the difference between your root component’s location and the camera’s location and move the root component to the adjusted location.
I also have a VR cockpit game in the works, and I have also solved how to snap the players camera HMD to the in game location of my players avatar head in another project by mapping the button to trigger it so I can do it anytime.
I used the original vr template reset HMD position and orientation node.
But I also have a constriction script code that attaches the camera to the players head on on begin play,
cant share pics as Im still at work:(