GSFC_1 Posted December 8, 2017 Share Posted December 8, 2017 Hey LW crew, i am trying to create the effect of flying from one place to another, and allow myself to create interfaces based on which direction i am looking. So, if I am looking east, and I hit the menu button, I want the menu to pop up in front of my east viewing vector, not some arbitrary Global "+Z" . How can I find the Location and rotation of my VR headset? I have found GetControllermodel, and I can locate the VR Controller, but i cannot find an API that will allow me access to the VR headset pos/rot, the only other thing I can think of is to use the actual Camera that is in my scene, but does LW actually use the camera as the VR controller? Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted December 8, 2017 Solution Share Posted December 8, 2017 I believe the headset position and orientation will be given by any camera in the scene, since this is set to your headset orientation when the world is rendered. You can use VR:SetOffset() to set an offset from the real world and the virtual world. This is how I have implemented a teleport mechanic. Note the latest commands are only available on the beta branch on Steam, and will not be 100% official until 4.5 is released December 22. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
GSFC_1 Posted December 9, 2017 Author Share Posted December 9, 2017 Actually, we had some great luck doing just that. Also, the SystemPrint() Function while attached to the camera spit out a real-time string into the debugger, pretty cool to see. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.