galister/WlxOverlay

Spacedrag is "glitchy"

2-3-5-41 opened this issue · 17 comments

When attempting to use spacedrag, the more I move my hand that is dragging, the worse the effect, it's like there is the initial drag offset that is then being put through a random vec3 function until I release the spacedrag button.

fixed as of 1.4.1

Just tried 1.4.1;

The issue is still there, and seems to have gotten worse.

2023-09-14.15-40-16.mp4

Extra Info:

I'm using the latest stable version of SteamVR (1.27.5)

The reset offset button doesn't work as expected; when pressed after not using spacedrag, it sets an odd offset of the playspace to the front left corner of the splayspace, and after using spacedrag, it does not reset the offset to that "expected" offset of the front left corner.

reset offset sets your offset to the one saved using set as default, if you don't set a default one, it will likely throw you off somewhere.

space drag lives here, in case you want to verify the logic
https://github.com/galister/WlxOverlay/blob/master/Extras/PlaySpaceMover.cs

Quick note; I'm unable to build and run .net projects for some reason, it builds .dll instead of the .so libraries.

Space drag

Comparing 1.3.1 to 1.4.1, there is what looks like a regression, since 1.3.1 would immediately update the "previous pose" which is now called _startPosition at the end of the function call, but now the _startPosition is only updated after spaceDragBefore is false, which I assume would only be if space drag is never used, or the previous action was not space drag.

So with that assumption in place, ApplyOffsetRelative is just adding the difference from the hand pose and a zero vector to the _offset every frame, instead of adding the actual hand position offset from previous and now frames in space.

Set as default

Looking that function, I don't see how it's supposed to store the offset of the default playspace if it's just storing the _offset that I'm assuming is a zero Vector3 until space drag is used, from what I see in the PlaySpaceMover class.

And just as a sanity check, I did make sure I used the Set as default button while my playspace was in it's correct configuration before using Reset offset, using reset offset set's my playspace to a odd offset from the origin.

set_default_does_not_work.mp4

did you by any chance calibrate steamvr for seated mode?

No, I calibrated for a standing play space

not sure what it could be, the fix was made by an index user so it's not the hmd. did you by any chance change that 'play area size' setting? the name eludes me, but i remember there being an option for small, medium, large. i think try with the middle one

I have not messed with the Room and Tracking setting. However, changing that setting does not change the behavior of 'Reset Offset', 'Set as default', or 'Space drag'.

alright. as for your earlier concerns, spaceDragBefore indicates if the drag binding was pressed on the previous frame or not, so it's only false for a single frame at the start of each drag.

we save the position where the drag starts into _startPosition, and then take the relative vector to the current position of the controller to apply as the offset. this is much smoother than the previous method of taking the delta each frame and incrementally applying that.

will need more testing on why this doesn't work for you, care to hop on discord or matrix? they're in the readme.

Sure thing, I've joined the matrix

Hi there,

Just out of curiosity, did you use Fix Floor per chance before trying Make Default & Reset Offset. I'm wondering if fix floor goes and interacts with a variable that reset offset also touches to determine floor height. Fix Floor will set the lowest controller as the floor when clicked.

Nope, I've only touched space drag, set ad default, and reset offset in 1.4.1

Try it and see if that does anything in terms of fixing the floor height issue.

But it's not a floor height issue, it's an issue with _offset not being properly used by Make Default, Reset Offset, or Space drag.

@2-3-5-41 do you want to check if the rust edition also has this issue? https://github.com/galister/wlx-overlay-s

@2-3-5-41 do you want to check if the rust edition also has this issue? https://github.com/galister/wlx-overlay-s

Sure!
I'll give it a look later tonight.

wlx-overlay-s has resolves the wild spacedrag.