Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Spacedrag is "glitchy" #20

Open
2-3-5-41 opened this issue Sep 6, 2023 · 17 comments
Open

Spacedrag is "glitchy" #20

2-3-5-41 opened this issue Sep 6, 2023 · 17 comments

Comments

@2-3-5-41
Copy link

2-3-5-41 commented Sep 6, 2023

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.

@galister
Copy link
Owner

fixed as of 1.4.1

@2-3-5-41
Copy link
Author

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.

@galister
Copy link
Owner

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

@galister galister reopened this Sep 14, 2023
@2-3-5-41
Copy link
Author

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

@galister
Copy link
Owner

did you by any chance calibrate steamvr for seated mode?

@2-3-5-41
Copy link
Author

No, I calibrated for a standing play space

@galister
Copy link
Owner

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

@2-3-5-41
Copy link
Author

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'.

@galister
Copy link
Owner

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.

@2-3-5-41
Copy link
Author

Sure thing, I've joined the matrix

@ComputerMaster1st
Copy link
Contributor

ComputerMaster1st commented Sep 16, 2023

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.

@2-3-5-41
Copy link
Author

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

@ComputerMaster1st
Copy link
Contributor

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

@2-3-5-41
Copy link
Author

2-3-5-41 commented Sep 17, 2023

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.

@galister
Copy link
Owner

@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
Copy link
Author

@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.

@2-3-5-41
Copy link
Author

2-3-5-41 commented Mar 1, 2024

wlx-overlay-s has resolves the wild spacedrag.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants