12-17-2017 06:38 AM
12-19-2017 05:44 PM
kojack said:
I've got some plans for that.
This is curretly just using (abusing?) the oculus sdk, by being a vr app that doesn't render anything, it just reads the input state. To do the opposite means injecting input into the sdk, which isn't supported. However, using the same method as Revive might let me hijack the function that returns touch state. It's something I might experiment with over the next few weeks (I start christmas vaction tomorrow, until feb).
No promises though. 🙂
12-25-2017 10:17 PM
@KillCard Success!
KillCard said:
kojack said:
I've got some plans for that.
This is curretly just using (abusing?) the oculus sdk, by being a vr app that doesn't render anything, it just reads the input state. To do the opposite means injecting input into the sdk, which isn't supported. However, using the same method as Revive might let me hijack the function that returns touch state. It's something I might experiment with over the next few weeks (I start christmas vaction tomorrow, until feb).
No promises though. 🙂
I wish you the best of luck!
Please let us know if you have any success.
12-25-2017 11:47 PM
kojack said:
@KillCard Success!
KillCard said:
kojack said:
I've got some plans for that.
This is curretly just using (abusing?) the oculus sdk, by being a vr app that doesn't render anything, it just reads the input state. To do the opposite means injecting input into the sdk, which isn't supported. However, using the same method as Revive might let me hijack the function that returns touch state. It's something I might experiment with over the next few weeks (I start christmas vaction tomorrow, until feb).
No promises though. 🙂
I wish you the best of luck!
Please let us know if you have any success.
Well, the very first step.
I've just managed to intercept programs asking for Touch state and replace the data with something else. Currently I'm tricking Google Earth into reversing the touch thumbsticks, so back zooms in and forward zooms out.
So at the very least, I could make a simple app that lets you (via a script) remap touch controls.
The downside is that right now you need to manually enter the process ID of the program to trick (so a DLL payload can be injected into it to bypass the oculus runtime). I'm sure I can come up with a better method, but for now it works as a basic test.
Something that would be very easy to do is swap index and grab triggers, or even swap left and right hands.
12-26-2017 12:42 AM
ProcessInput = function(controllerType)
state, result = ovr_GetInputState(controllerType)
state.IndexTrigger[1],state.HandTrigger[1] = state.HandTrigger[1], state.IndexTrigger[1]
ovr_SetInputState(state)
return result
end
This grabs the real state, then swaps the right hand index and hand triggers.12-26-2017 06:00 PM
require 'bit'
ProcessInput = function(controllerType)
state, result = ovr_GetInputState(controllerType)
state2,res2 = ovr_GetInputState(ovrControllerType.Remote)
if bit.band(state2.Buttons, ovrButton.Up) ~= 0 then
state.Thumbstick[1].y=1
end
if bit.band(state2.Buttons, ovrButton.Down) ~= 0 then
state.Thumbstick[1].y=-1
end
if bit.band(state2.Buttons, ovrButton.Right) ~= 0 then
state.Thumbstick[1].x=1
end
if bit.band(state2.Buttons, ovrButton.Left) ~= 0 then
state.Thumbstick[1].x=-1
end
return state,result
end
What this one does is read the requested controller type (for example Google Earth asks for either Touch) into state.01-02-2018 10:22 PM
function HookGetTrackingState(time, latency)
state = ovr_GetTrackingState(time, latency)
state.HandPoses[0].ThePose.Orientation = state.HandPoses[1].ThePose.Orientation
return state
end
copies the right touch orientation to the left touch, while leaving it's position alone.01-03-2018 04:02 AM
kojack said:
I really should make a new thread for it, but I'm not quite ready for a release yet, so I'll just dump this here. More features to add before the base version.
I've done a large code refactoring of Oculus Injector, or whatever I end up calling it. I've added some new stuff to it too.
Some new features:
- time access
- keyboard access (so you can make keys trigger Touch/Remote/Xbox inputs)
- intercept tracking data!
The last one means I can mess with position and orientation data of both touch controllers and the headset.
For example, this code:copies the right touch orientation to the left touch, while leaving it's position alone.function HookGetTrackingState(time, latency)
state = ovr_GetTrackingState(time, latency)
state.HandPoses[0].ThePose.Orientation = state.HandPoses[1].ThePose.Orientation
return state
end
Although now most of ideas for using this stuff will mean I'll have to implement a full vector/quaternion library in lua. 🙂
I'm going to try intercepting the calls to ask which controllers are present. I might be able to create fake touches or remotes.
01-20-2018 02:59 PM
02-07-2018 06:51 PM
02-11-2018 03:41 AM