_provector Posted May 4, 2020 Share Posted May 4, 2020 Hi All! I've been trying to implement free locomotion in VR and learned quite a bit in that process. First a question: Is there a way to set a VR Offset Rotation value in a similar way like VR: SetOffset(vec3) either way through Lua (which I very doubt) or maybe C++ through openVR library? (If so, how?) The lack of above function causes two problems: - One is the inability to implement snap turn in Roomscale mode (Any attempt to "set" the camera seems to be ignored) - The second one is that in Seated mode, whenever I try to manipulate the player camera and adjust the VR Offset accordingly, after turning the camera "in game" the vr offset is completely off (as It can't be turned). Please help guys, as it is a dealbreaker for my project Kind Regards: Provector Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted May 4, 2020 Solution Share Posted May 4, 2020 The beta build on Steam has a function for the rotation. 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...
_provector Posted May 4, 2020 Author Share Posted May 4, 2020 You just made my day Testing it out, thank You! Quote Link to comment Share on other sites More sharing options...
_provector Posted May 4, 2020 Author Share Posted May 4, 2020 I can see the option to GetRotation, but any attempt to SetRotation fails due to unknown function, any pointers please? Quote Link to comment Share on other sites More sharing options...
Josh Posted May 4, 2020 Share Posted May 4, 2020 Here's the syntax: static void SetOffset(const Vec3& position);//lua static void SetOffset(const float x, const float y, const float z);//lua static void SetOffset(const float x, const float y, const float z, const float pitch, const float yaw, const float roll);//lua static void SetOffset(const Vec3& position, const Vec3& rotation);//lua static void SetOffset(const Vec3& position, const Quat& rotation);//lua 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...
_provector Posted May 4, 2020 Author Share Posted May 4, 2020 Brilliant, Thank You! 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.