Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gravity and gyroscope support to UWP #7503

Closed
BastiaanOlij opened this issue Jan 12, 2017 · 13 comments
Closed

Add gravity and gyroscope support to UWP #7503

BastiaanOlij opened this issue Jan 12, 2017 · 13 comments

Comments

@BastiaanOlij
Copy link
Contributor

BastiaanOlij commented Jan 12, 2017

This is related to PR #7127 which sees introduction of gyro and magneto support to iOS.
Part of that PR adds the gravity vector alongside the accelerometer data. Both Android and UWP need to be brought in line so all three platforms are in sync. This vector is fairly handy for VR and AR implementations as the raw accelerometer data is the result of gravity pulling on the device + the user moving the device around and when used directly results in a lot of jitter.

On android this should be a pretty straight forward enhancement by adding TYPE_GRAVITY to the motion sensor code and writing it out to the gravity vector that was added to INPUT through #7127.

on UWP I have no idea at this time. You can find the documentation here:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.accelerometer.aspx
But on face value there is no implementation for extracting the gravity vector and it may require building that ourselves.

Unfortunately I don't have access to an Android nor Windows phone or I would add this change to 7127 myself

@BastiaanOlij
Copy link
Contributor Author

Anybody available to add this on UWP?

@vnen
Copy link
Member

vnen commented Dec 9, 2017

I looked at the docs and did some searches but still have no clue how to extract the gravity vector. If anyone has an idea I can use the help.

@ghost
Copy link

ghost commented Apr 10, 2018

First of all thank you for your report and sorry for the delay.

We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.

We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us.
Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about it here?

For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.

Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.

Thanks in advance.

Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.

@BastiaanOlij
Copy link
Contributor Author

For Android this was added, still waiting for someone to look into UWP, not sure if that really relevant though, who still has microsoft phones? :)

@GeorgeS2019

This comment has been minimized.

@vnen
Copy link
Member

vnen commented Jun 22, 2020

@GeorgeS2019 no, it doesn't. Fixing the export won't magically add a gravity vector.

@GeorgeS2019
Copy link

@vnen, I try to summarize all issues related to UWP because a working UWP godot export is critical for OpenXR support using Godot for Hololens (with gyro and magneto support)

This issue is also relevant for Godot VR ( Oculus android) or OpenXR for both Oculus (Android) and Hololens (UWP)

@vnen
Copy link
Member

vnen commented Jun 22, 2020

@GeorgeS2019 yeah, but this is the kind of issue that won't be solved without a specific PR addressing it. It's not related to the export process in itself. So adding comments like this only generate pointless noise. A tracker issue for all UWP related issues would be much more useful.

@GeorgeS2019
Copy link

@vnen

A tracker issue for all UWP related issues would be much more useful.

Done => many of which are related to UWP export

In my view, the biggest challenge for any new person trying to address any (old and new) UWP issues will get stuck because UWP export is not reliable.

Without disseminating this limitation (UWP export is not reliable), many will waste lots of time.

@vnen
Copy link
Member

vnen commented Jun 22, 2020

@GeorgeS2019

A tracker issue for all UWP related issues would be much more useful.

Done => many of which are related to UWP export

That's an issue about C# support in UWP. Derailing it with unrelated comments isn't helpful. Here are examples of actual tracker issues.

In my view, the biggest challenge for any new person trying to address any (old and new) UWP issues will get stuck because UWP export is not reliable.

UWP export is an issue but anyone trying to address these issues either already know that or will hit it pretty soon. Commenting on every issue mentioning a possible workaround doesn't help when nobody mentioned the export being a deterrent for a potential fix. It is just noise.

You were already warned to stop cross-reference unrelated issues on the very same issue that you linked.

@godotengine godotengine deleted a comment from GeorgeS2019 Jun 22, 2020
@ZodmanPerth
Copy link
Contributor

@BastiaanOlij I confirm that while Input.get_gravity() doesn't work on UWP but Input.get_accelerometer() does work.
I'm using 3.2.stable.official.

@akien-mga akien-mga changed the title Add gravity vector support to Android and UWP Add gravity and gyroscope support to UWP Apr 28, 2021
@akien-mga
Copy link
Member

To clarify the current state, see the Input docs (as of 3.3):

  • get_accelerometer() is implemented on Android, iOS and UWP
  • get_gravity() is implemented on Android and iOS
  • get_gyroscope() is implemented on Android and iOS

@BastiaanOlij
Copy link
Contributor Author

I'm closing this issue as this is way outdated and I think we redid some of this logic since then.

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

No branches or pull requests

7 participants
@ZodmanPerth @BastiaanOlij @akien-mga @bojidar-bg @vnen @GeorgeS2019 and others