AnthonyPython Posted October 2 Share Posted October 2 Overload Entity::Attach(VrDevice) does not exist in lua we can HMD::SetOffset in lua but not HMD::GetOffset of the HMD( checked and it looks like Getting the offset isn't in C++ either) VR Controllers right and left stick axis is missing entirely Quote OS: Windows 10 Pro CPU: i3-10100 CPU @ 3.60GHz GPU: NVIDIA 2060 Super - 8 GB RAM: 32 GB Link to comment Share on other sites More sharing options...
Josh Posted October 4 Share Posted October 4 On 10/2/2024 at 12:09 PM, AnthonyPython said: Overload Entity::Attach(VrDevice) does not exist in lua Fixed for the next build. On 10/2/2024 at 12:09 PM, AnthonyPython said: we can HMD::SetOffset in lua but not HMD::GetOffset of the HMD( checked and it looks like Getting the offset isn't in C++ either) There is currently no HMD::GetOffset command. I am not sure how it would work because SetOffset accepts a position and a rotation. On 10/2/2024 at 12:09 PM, AnthonyPython said: VR Controllers right and left stick axis is missing entirely I don't understand this? 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...
AnthonyPython Posted October 4 Author Share Posted October 4 3 hours ago, Josh said: Fixed for the next build. There is currently no HMD::GetOffset command. I am not sure how it would work because SetOffset accepts a position and a rotation. I don't understand this? there is no way to get the analogue sticks on VR controllers just trigger and touchpad through the VR stuff, they are only available for the normal gamepad stuff, at least that's what I see with the enum for them. Quote OS: Windows 10 Pro CPU: i3-10100 CPU @ 3.60GHz GPU: NVIDIA 2060 Super - 8 GB RAM: 32 GB Link to comment Share on other sites More sharing options...
Josh Posted October 5 Share Posted October 5 I thought the touchpad axis was the same thing as the analog stick on the knuckles controllers... 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...
AnthonyPython Posted October 5 Author Share Posted October 5 18 minutes ago, Josh said: I thought the touchpad axis was the same thing as the analog stick on the knuckles controllers... it seems to not be, they appear to be independent at least from my own testing I've only been able to use the actual touchpad stuff if rightController then local axisRight = rightController:GetAxis(1) if (Abs(axisRight.x) > tol or Abs(axisRight.y) > tol) then local newposition = Vec3(self.targetEntity:GetPosition(true).x + axisRight.x,self.targetEntity:GetPosition(true).y,self.targetEntity:GetPosition(true).z) self.targetEntity:SetPosition(newposition,true) Print("right X: " .. axisRight.x .. "right y" ..axisRight.y) end end and this only works on the touchpad from when I tried Quote OS: Windows 10 Pro CPU: i3-10100 CPU @ 3.60GHz GPU: NVIDIA 2060 Super - 8 GB RAM: 32 GB Link to comment Share on other sites More sharing options...
Josh Posted October 8 Share Posted October 8 I just tried a Valve knuckle controller with this code, and it showed the same axis for the analog stick and the little toucharea next to it: Note that the constants in Lua are equal to the C++ constant + 1, but it looks like you already figured that out. This is the VRController Lua binding code. L->new_usertype<VrController> ( "VrControllerClass", sol::base_classes, sol::bases<VrDevice, Object>(), sol::meta_function::index, &Object::dynamic_get, sol::meta_function::new_index, &Object::dynamic_set, "ButtonDown", [](VrController& c, int b) { return c.ButtonDown(VrControllerButton(b - 1));}, "ButtonHit", [](VrController& c, int b) { return c.ButtonHit(VrControllerButton(b - 1));}, "ButtonTouched", [](VrController& c, int b) { return c.ButtonTouched(VrControllerButton(b - 1));}, "GetAxis", [](VrController& c, int a) { return c.GetAxis(VrControllerAxis(a - 1));}, "Rumble", sol::overload( [](VrController& c, VrControllerAxis a) { c.Rumble(a); }, [](VrController& c, VrControllerAxis a, int d) { c.Rumble(a, d); } ) ); L->set("VRAXIS_TRIGGER", VRAXIS_TRIGGER + 1); L->set("VRAXIS_TOUCHPAD", VRAXIS_TOUCHPAD + 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...
Solution AnthonyPython Posted October 10 Author Solution Share Posted October 10 strange now it decided to work- just one of those days I guess. while were on the topic of missing VR stuff How exactly are we going to deal with the steam VR poses or do poses in general for our stuff, couldn't we just associate a animation frame or something with like our own system of doing it and just blending. since were using openVR currently (and we perhaps should stay on) still there should be away for us to detect finger curl on the knuckles as far as I know its a 0.0-1.0 float for each of the fingers. I don't think openXR has that though since last i checked. Quote OS: Windows 10 Pro CPU: i3-10100 CPU @ 3.60GHz GPU: NVIDIA 2060 Super - 8 GB RAM: 32 GB Link to comment Share on other sites More sharing options...
Josh Posted October 10 Share Posted October 10 Valve's support for the Knuckles controllers is currently a nightmare. You have to go through their Steam input system and use some JSON definitions in a file, but they won't provide an example of what it's supposed to look like. Any questions on their forum or Github go unanswered. I'll contact somebody at Valve and see if I can get more info on this. 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...
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.